avcodec/vp3: always set pix_fmt in theora_decode_header()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 30 Nov 2015 02:32:36 +0000 (03:32 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 20 Dec 2015 09:59:27 +0000 (10:59 +0100)
Fixes assertion failure
Fixes: d0bb0662da342ec65f8f2a081222e6b9/signal_sigabrt_7ffff6ae7cc9_5471_82964f0a9ac2f4d3d59390c15473f6f7.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a814f1d364ba912adf61adef158168c5f7604e93)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/vp3.c

index a0845e4..fbacedf 100644 (file)
@@ -2321,7 +2321,8 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
             return AVERROR_INVALIDDATA;
         }
         skip_bits(gb, 3); /* reserved */
-    }
+    } else
+        avctx->pix_fmt = AV_PIX_FMT_YUV420P;
 
     ret = ff_set_dimensions(avctx, s->width, s->height);
     if (ret < 0)