On Tuesday 03 May 2016 03:04:50 pm Ronald S. Bultje wrote: > > + if (av_pix_fmt_desc_get(st->codecpar->format)->flags && > > AV_PIX_FMT_FLAG_ALPHA)
> I think you want s/&&/&/? Definitely, new patch attached. Thank you, Carl Eugen
From 359b2b5a46d8274ac66f9c47a88e2ead25f7479c Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceho...@ag.or.at> Date: Tue, 3 May 2016 17:53:40 +0200 Subject: [PATCH] lavf/webpenc: Do not set alpha flag for yuv420p. Fixes one usecase of ticket #5431. --- libavformat/webpenc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c index 2e0147c..5d353cf 100644 --- a/libavformat/webpenc.c +++ b/libavformat/webpenc.c @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/opt.h" +#include "libavutil/pixdesc.h" #include "avformat.h" #include "internal.h" @@ -107,7 +108,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 (av_pix_fmt_desc_get(st->codecpar->format)->flags & AV_PIX_FMT_FLAG_ALPHA) + flags |= 16; // stream may contain transparency information } if (vp8x) { -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel