We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39314e1 commit cf40e09Copy full SHA for cf40e09
src/AvTranscoder/OptionLoader.cpp
@@ -301,9 +301,9 @@ std::vector<std::string> OptionLoader::getPixelFormats( const std::string& video
301
// specific video codec
302
else
303
{
304
- AVCodec* videoCodec = avcodec_find_encoder_by_name( videoCodecName.c_str() );
+ const AVCodec* videoCodec = avcodec_find_encoder_by_name( videoCodecName.c_str() );
305
306
- if( videoCodec->pix_fmts != NULL )
+ if( videoCodec && videoCodec->pix_fmts != NULL )
307
308
size_t pix_fmt = 0;
309
while( videoCodec->pix_fmts[pix_fmt] != -1 )
0 commit comments