File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -279,12 +279,12 @@ std::vector<std::string> OptionLoader::getPixelFormats ( const std::string& vide
279
279
// all video codec concerned
280
280
if ( videoCodecName == " " )
281
281
{
282
- for ( int pix_fmt = 0 ; pix_fmt < PIX_FMT_NB; ++pix_fmt )
282
+ const AVPixFmtDescriptor* pixFmtDesc = NULL ;
283
+ while ( ( pixFmtDesc = av_pix_fmt_desc_next ( pixFmtDesc ) ) != NULL )
283
284
{
284
- const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
285
- if ( ! pix_desc->name )
285
+ if ( ! pixFmtDesc->name )
286
286
continue ;
287
- pixelFormats.push_back ( std::string ( pix_desc ->name ) );
287
+ pixelFormats.push_back ( std::string ( pixFmtDesc ->name ) );
288
288
}
289
289
}
290
290
// specific video codec
@@ -297,7 +297,7 @@ std::vector<std::string> OptionLoader::getPixelFormats ( const std::string& vide
297
297
size_t pix_fmt = 0 ;
298
298
while ( videoCodec->pix_fmts [pix_fmt] != -1 )
299
299
{
300
- const AVPixFmtDescriptor* pix_desc = &av_pix_fmt_descriptors[ videoCodec->pix_fmts [pix_fmt] ] ;
300
+ const AVPixFmtDescriptor* pix_desc = av_pix_fmt_desc_get ( videoCodec->pix_fmts [pix_fmt] ) ;
301
301
if ( ! pix_desc->name )
302
302
continue ;
303
303
pixelFormats.push_back ( std::string ( pix_desc->name ) );
You can’t perform that action at this time.
0 commit comments