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

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Apr 12 21:32:43 CEST 2016


Hi!

Attached patch may fix ticket #5431.

Please review, Carl Eugen
-------------- next part --------------
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) {


More information about the ffmpeg-devel mailing list