[FFmpeg-cvslog] vc1: Use codec ID from AVCodecContext while parsing frame header

Mashiat Sarker Shakkhar git at videolan.org
Sat Oct 13 17:12:33 CEST 2012


ffmpeg | branch: master | Mashiat Sarker Shakkhar <mashiat.sarker at gmail.com> | Thu Oct 11 13:13:56 2012 -0400| [5d2be71b9ecf2a88752666a2c4039f4d98419d35] | committer: Kostya Shishkov

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 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d2be71b9ecf2a88752666a2c4039f4d98419d35
---

 libavcodec/vc1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index c7edc25..a8dd38a 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;



More information about the ffmpeg-cvslog mailing list