OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
863f4c3
)
avformat/oggdec: dont read timestamps from EOS pages of ogm videos
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 4 Jan 2014 16:33:59 +0000
(17:33 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 4 Jan 2014 17:39:42 +0000
(18:39 +0100)
Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggdec.c
patch
|
blob
|
history
diff --git
a/libavformat/oggdec.c
b/libavformat/oggdec.c
index
04405cf
..
efb8f04
100644
(file)
--- a/
libavformat/oggdec.c
+++ b/
libavformat/oggdec.c
@@
-808,6
+808,11
@@
static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index,
&& !ogg_packet(s, &i, &pstart, &psize, pos_arg)) {
if (i == stream_index) {
struct ogg_stream *os = ogg->streams + stream_index;
+ // Dont trust the last timestamps of a ogm video
+ if ( (os->flags & OGG_FLAG_EOS)
+ && !(os->flags & OGG_FLAG_BOS)
+ && os->codec == &ff_ogm_video_codec)
+ continue;
pts = ogg_calc_pts(s, i, NULL);
ogg_validate_keyframe(s, i, pstart, psize);
if (os->pflags & AV_PKT_FLAG_KEY) {