[FFmpeg-devel] [PATCH]lavf/webpenc: Do not set alpha flag for yuv420p

wm4 nfxjfg at googlemail.com
Tue Apr 12 21:47:14 CEST 2016


On Tue, 12 Apr 2016 21:32:43 +0200
Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c
> index 2e0147c..38183ff 100644
> --- a/libavformat/webpenc.c
> +++ b/libavformat/webpenc.c
> @@ -107,7 +107,9 @@ static int flush(AVFormatContext *s, int trailer, int64_t pts)
>          if (w->frame_count == 1) {
>              if (!trailer) {
>                  vp8x = 1;
> -                flags |= 2 + 16;
> +                flags |= 2;
> +                if (st->codecpar->format != AV_PIX_FMT_YUV420P)
> +                    flags |= 16; // stream may contain transparency information
>              }
>  
>              if (vp8x) {

The pixel format shouldn't be required to be set in this muxer. It's
generally not needed. It also means that if the user doesn't set it,
everything will apparently work well, but it will be flagged as alpha.

When will you learn to send properly formatted patches (git
format-patch)?


More information about the ffmpeg-devel mailing list