avcodec/mpeg12dec: Initialize chroma_format to 1
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 30 Sep 2015 19:16:29 +0000 (21:16 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 30 Sep 2015 19:51:16 +0000 (21:51 +0200)
This ensures that chroma format is never set to an invalid value

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

index 5d916d1..21ccf6c 100644 (file)
@@ -1130,6 +1130,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
     ff_mpeg12_common_init(&s->mpeg_enc_ctx);
     ff_mpeg12_init_vlcs();
 
+    s2->chroma_format              = 1;
     s->mpeg_enc_ctx_allocated      = 0;
     s->mpeg_enc_ctx.picture_number = 0;
     s->repeat_field                = 0;