[FFmpeg-devel] [PATCH] bug in avcodec_find_best_pix_fmt_of_list

Michael Niedermayer michael at niedermayer.cc
Sun Apr 1 17:25:51 EEST 2018


On Sat, Mar 31, 2018 at 08:09:38PM +0700, Александр Чирятьев wrote:
> Hello!
> 
> Let me propose to review my patch for avcodec_find_best_pix_fmt_of_list.
> It's very old bug. Here is example:
> 
> AVPixelFormat pixFmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA };
> int loss = 0;
> AVPixelFormat best_fmt = avcodec_find_best_pix_fmt_of_list(pixFmts,
> AV_PIX_FMT_BGRA, 1, &loss);
> 
> Now best_fmt is AV_PIX_FMT_RGB24. But AV_PIX_FMT_RGBA is better.
> 
> 
> Regards,
> Alexander Chiryatev.
> 

>  imgconvert.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> f342eb7977f6a7c59ea68c2d091f855e18a566ef  bug-in-avcodec_find_best_pix_fmt_of_list.patch
> From 4e9caf7d208a6de065ba0ee9f164ccf577fb7e89 Mon Sep 17 00:00:00 2001
> From: heimdallr <heimdallr at ngs.ru>
> Date: Sat, 31 Mar 2018 19:37:23 +0700
> Subject: [PATCH] bug in avcodec_find_best_pix_fmt_of_list

will apply

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180401/e15a5c5c/attachment.sig>


More information about the ffmpeg-devel mailing list