[FFmpeg-cvslog] oggdec: reset lastpts so that justins vorbis duration correction is not skiped

Michael Niedermayer git at videolan.org
Fri May 4 14:49:42 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May  4 13:45:51 2012 +0200| [96fb233e6457f9bd37b30d77dace2736926acd1b] | committer: Michael Niedermayer

oggdec: reset lastpts so that justins vorbis duration correction is not skiped

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96fb233e6457f9bd37b30d77dace2736926acd1b
---

 libavformat/oggdec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index fc488da..4eaae2d 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;



More information about the ffmpeg-cvslog mailing list