Mercurial > libavcodec.hg
diff svq3.c @ 1754:bdf3927bf8c5 libavcodec
closed gop support & flags2 as all bits in flags are used
and a few minor things i forgot to commit ...
author | michael |
---|---|
date | Thu, 22 Jan 2004 19:48:28 +0000 |
parents | 92643b9794a9 |
children | 869256817a91 |
line wrap: on
line diff
--- a/svq3.c Thu Jan 22 12:09:14 2004 +0000 +++ b/svq3.c Thu Jan 22 19:48:28 2004 +0000 @@ -697,8 +697,10 @@ 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 @@ } } - 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 @@ *data_size = 0; s->flags = avctx->flags; + s->flags2 = avctx->flags2; s->unrestricted_mv = 1; if (!s->context_initialized) {