git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71ca855
)
avcodec/ituh263dec: Correct timestamp recovery for B frames
author
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 1 Feb 2017 19:20:07 +0000
(20:20 +0100)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 1 Feb 2017 21:01:34 +0000
(22:01 +0100)
Improves u263_b-frames_5.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ituh263dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/ituh263dec.c
b/libavcodec/ituh263dec.c
index
4a8bbf7
..
31951ab
100644
(file)
--- a/
libavcodec/ituh263dec.c
+++ b/
libavcodec/ituh263dec.c
@@
-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 */