From 303e50e65b8b9dc66ef9929a5a638a16378da64c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 22 Jan 2004 19:48:28 +0000 Subject: closed gop support & flags2 as all bits in flags are used and a few minor things i forgot to commit ... Originally committed as revision 2718 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/svq3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavcodec/svq3.c') diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index b160987a05..c8720c07aa 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -697,8 +697,10 @@ static int svq3_decode_slice_header (H264Context *h) { h->next_slice_index = s->gb.index + 8*show_bits (&s->gb, 8*length) + 8*length; - if (h->next_slice_index > s->gb.size_in_bits) + if (h->next_slice_index > s->gb.size_in_bits){ + av_log(h->s.avctx, AV_LOG_ERROR, "slice after bitstream end\n"); return -1; + } s->gb.size_in_bits = h->next_slice_index - 8*(length - 1); s->gb.index += 8; @@ -709,8 +711,10 @@ static int svq3_decode_slice_header (H264Context *h) { } } - if ((i = svq3_get_ue_golomb (&s->gb)) == INVALID_VLC || i >= 3) + if ((i = svq3_get_ue_golomb (&s->gb)) == INVALID_VLC || i >= 3){ + av_log(h->s.avctx, AV_LOG_ERROR, "illegal slice type %d \n", i); return -1; + } h->slice_type = golomb_to_pict_type[i]; @@ -766,6 +770,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, *data_size = 0; s->flags = avctx->flags; + s->flags2 = avctx->flags2; s->unrestricted_mv = 1; if (!s->context_initialized) { -- cgit v1.2.3