Commit 0126cd95 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ituh263dec: Correct timestamp recovery for B frames

Improves u263_b-frames_5.avi
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 71ca855c
......@@ -928,8 +928,9 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
}
/* temporal reference */
i = get_bits(&s->gb, 8); /* picture timestamp */
if( (s->picture_number&~0xFF)+i < s->picture_number)
i+= 256;
i -= (i - (s->picture_number & 0xFF) + 128) & ~0xFF;
s->picture_number= (s->picture_number&~0xFF) + i;
/* PTYPE starts here */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment