avcodec/pngdec: reset has_trns after every decode_frame_png()
authorPaul B Mahol <onemda@gmail.com>
Mon, 28 Sep 2015 18:53:01 +0000 (20:53 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 28 Sep 2015 18:54:09 +0000 (20:54 +0200)
Fixes #4887.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/pngdec.c

index ee11f12..1b47b18 100644 (file)
@@ -1254,7 +1254,7 @@ static int decode_frame_png(AVCodecContext *avctx,
         return AVERROR_INVALIDDATA;
     }
 
-    s->y = s->state = 0;
+    s->y = s->state = s->has_trns = 0;
 
     /* init the zlib */
     s->zstream.zalloc = ff_png_zalloc;