diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-04 13:45:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-04 14:40:22 +0200 |
commit | 96fb233e6457f9bd37b30d77dace2736926acd1b (patch) | |
tree | 258d81bf55094f2a01865a8f62e353e2e6331744 | |
parent | 5f9f78dc9b8d400b7b2c44b67a6384787946f44e (diff) | |
download | ffmpeg-96fb233e6457f9bd37b30d77dace2736926acd1b.tar.gz |
oggdec: reset lastpts so that justins vorbis duration correction is not skiped
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/oggdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index fc488dad13..4eaae2de75 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -121,6 +121,7 @@ static int ogg_reset(AVFormatContext *s) { struct ogg *ogg = s->priv_data; int i; + int64_t start_pos = avio_tell(s->pb); for (i = 0; i < ogg->nstreams; i++){ struct ogg_stream *os = ogg->streams + i; @@ -135,6 +136,9 @@ static int ogg_reset(AVFormatContext *s) os->nsegs = 0; os->segp = 0; os->incomplete = 0; + if (start_pos <= s->data_offset) { + os->lastpts = 0; + } } ogg->curidx = -1; |