From 5d2be71b9ecf2a88752666a2c4039f4d98419d35 Mon Sep 17 00:00:00 2001 From: Mashiat Sarker Shakkhar Date: Thu, 11 Oct 2012 13:13:56 -0400 Subject: vc1: Use codec ID from AVCodecContext while parsing frame header This fixes a segfault with samples that I have (both of them MPEG-TS). Looks like avctx->codec is not being set during parsing. Signed-off-by: Kostya Shishkov --- libavcodec/vc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index c7edc25a25..a8dd38ad5f 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -576,7 +576,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) if (v->finterpflag) v->interpfrm = get_bits1(gb); - if (v->s.avctx->codec->id == AV_CODEC_ID_MSS2) + if (v->s.avctx->codec_id == AV_CODEC_ID_MSS2) v->respic = v->rangered = v->multires = get_bits(gb, 2) == 1; -- cgit v1.2.3