[FFmpeg-devel] [PATCH] Fixes avcodec_find_best_pix_fmt() with more than 64 pix fmts defined

Matthew Einhorn moiein2000 at gmail.com
Wed Aug 17 08:38:37 CEST 2011


Hi,

As stated, this patch (attached) should fix
avcodec_find_best_pix_fmt() so that now with more than 64 pix fmts,
the function should be able to work for the first 64 fmts. Currently
the function returns a bad formats, for example,
avcodec_find_best_pix_fmt(1ULL << PIX_FMT_GRAY8, PIX_FMT_YUV420P, 0,
&nLoss) returns 72 instead of 8.

Please be gentle as this is the first time I used git or submitted a
patch. If this works fine I'll try to submit a patch for a second
avcodec_find_best_pix_fmt_alt function that'll support more than 64
formats as input to the function.

Thanks,
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixes-avcodec_find_best_pix_fmt-when-there-s-more-th.patch
Type: application/octet-stream
Size: 1890 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110817/4149ab35/attachment.obj>


More information about the ffmpeg-devel mailing list