diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-01-22 19:48:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-01-22 19:48:28 +0000 |
commit | 303e50e65b8b9dc66ef9929a5a638a16378da64c (patch) | |
tree | 1c4844019a66159a182fa2b059d008deda908c59 /libavcodec/svq3.c | |
parent | d398a27e0b98f2d575d4e69ce4974768dff9f7d8 (diff) | |
download | ffmpeg-303e50e65b8b9dc66ef9929a5a638a16378da64c.tar.gz |
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
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) { |