1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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 <kostya.shishkov@gmail.com>
This commit is contained in:
Mashiat Sarker Shakkhar 2012-10-11 13:13:56 -04:00 committed by Kostya Shishkov
parent 6304f78edf
commit 5d2be71b9e

View File

@ -576,7 +576,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
if (v->finterpflag) if (v->finterpflag)
v->interpfrm = get_bits1(gb); 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->respic =
v->rangered = v->rangered =
v->multires = get_bits(gb, 2) == 1; v->multires = get_bits(gb, 2) == 1;