diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 10:13:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 10:14:30 +0100 |
commit | 46c78429949239ec4eea23406332c4ae747ac8f2 (patch) | |
tree | 5fd80ea649026bbc0116bff3f982b7893f3f04a8 | |
parent | cc415956a45cd17ab74aae3bb7465953c387d458 (diff) | |
download | ffmpeg-46c78429949239ec4eea23406332c4ae747ac8f2.tar.gz |
ituh263dec: Implement enough of Annex O (scalability) to fix a FPE.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ituh263dec.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 0c3cf2fc89..a16b17f4b5 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -1085,6 +1085,20 @@ int ff_h263_decode_picture_header(MpegEncContext *s) skip_bits(&s->gb, 2); /* Quantization information for B-pictures */ } + if (s->pict_type!=AV_PICTURE_TYPE_B) { + s->time= s->picture_number; + s->pp_time= s->time - s->last_non_b_time; + s->last_non_b_time= s->time; + }else{ + s->time= s->picture_number; + s->pb_time= s->pp_time - (s->last_non_b_time - s->time); + if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){ + s->pp_time = 2; + s->pb_time = 1; + } + ff_mpeg4_init_direct_mv(s); + } + /* PEI */ while (get_bits1(&s->gb) != 0) { skip_bits(&s->gb, 8); |