| OLD | NEW |
| (Empty) | |
| 1 diff -wurp -N orig/libavcodec/vp3.c ffmpeg/libavcodec/vp3.c |
| 2 --- orig/libavcodec/vp3.c 2011-07-12 20:47:55.102967990 -0700 |
| 3 +++ ffmpeg/libavcodec/vp3.c 2011-07-12 20:47:55.172931387 -0700 |
| 4 @@ -866,6 +866,11 @@ static int unpack_vlcs(Vp3DecodeContext |
| 5 int num_coeffs = s->num_coded_frags[plane][coeff_index]; |
| 6 int16_t *dct_tokens = s->dct_tokens[plane][coeff_index]; |
| 7 |
| 8 +#ifdef ALT_BITSTREAM_READER |
| 9 + if (gb->buffer_exhausted && gb->index > gb->size_in_bits) |
| 10 + return 0; |
| 11 +#endif |
| 12 + |
| 13 /* local references to structure members to avoid repeated deferences */ |
| 14 int *coded_fragment_list = s->coded_fragment_list[plane]; |
| 15 Vp3Fragment *all_fragments = s->all_fragments; |
| 16 @@ -1043,6 +1048,11 @@ static int unpack_dct_coeffs(Vp3DecodeCo |
| 17 2, residual_eob_run); |
| 18 } |
| 19 |
| 20 +#ifdef ALT_BITSTREAM_READER |
| 21 + if (gb->buffer_exhausted && gb->index > gb->size_in_bits) |
| 22 + return 1; |
| 23 +#endif |
| 24 + |
| 25 return 0; |
| 26 } |
| 27 |
| 28 @@ -1836,6 +1846,7 @@ static int vp3_decode_frame(AVCodecConte |
| 29 int i; |
| 30 |
| 31 init_get_bits(&gb, buf, buf_size * 8); |
| 32 + gb.buffer_enforcing = 1; |
| 33 |
| 34 if (s->theora && get_bits1(&gb)) |
| 35 { |
| 36 @@ -2283,6 +2294,7 @@ static av_cold int theora_decode_init(AV |
| 37 |
| 38 for(i=0;i<3;i++) { |
| 39 init_get_bits(&gb, header_start[i], header_len[i] * 8); |
| 40 + gb.buffer_enforcing = 1; |
| 41 |
| 42 ptype = get_bits(&gb, 8); |
| 43 |
| OLD | NEW |