File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,13 @@ std::vector<std::string> OptionLoader::getPixelFormats ( const std::string& vide
284
284
if ( videoCodecName == " " )
285
285
{
286
286
const AVPixFmtDescriptor* pixFmtDesc = NULL ;
287
+
288
+ #if LIBAVUTIL_VERSION_INT < AV_VERSION_INT( 51, 44, 0 )
289
+ for ( int pix_fmt = 0 ; pix_fmt < PIX_FMT_NB; ++pix_fmt )
290
+ pixFmtDesc = &av_pix_fmt_descriptors[pix_fmt];
291
+ #else
287
292
while ( ( pixFmtDesc = av_pix_fmt_desc_next ( pixFmtDesc ) ) != NULL )
293
+ #endif
288
294
{
289
295
if ( ! pixFmtDesc->name )
290
296
continue ;
@@ -301,7 +307,11 @@ std::vector<std::string> OptionLoader::getPixelFormats ( const std::string& vide
301
307
size_t pix_fmt = 0 ;
302
308
while ( videoCodec->pix_fmts [pix_fmt] != -1 )
303
309
{
310
+ #if LIBAVUTIL_VERSION_INT < AV_VERSION_INT( 51, 44, 0 )
311
+ const AVPixFmtDescriptor* pix_desc = &av_pix_fmt_descriptors[ videoCodec->pix_fmts [pix_fmt] ];
312
+ #else
304
313
const AVPixFmtDescriptor* pix_desc = av_pix_fmt_desc_get ( videoCodec->pix_fmts [pix_fmt] );
314
+ #endif
305
315
if ( ! pix_desc->name )
306
316
continue ;
307
317
pixelFormats.push_back ( std::string ( pix_desc->name ) );
You can’t perform that action at this time.
0 commit comments