[FFmpeg-cvslog] avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0

Michael Niedermayer git at videolan.org
Wed Jun 11 18:27:55 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 11 18:03:45 2014 +0200| [27b8ef5bb7095e67d2888e0391b88dcffd04036a] | committer: Michael Niedermayer

avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0

Fixes Ticket3710

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

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

 libavformat/oggparsevorbis.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 51c5eb3..8103d9d 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -427,6 +427,10 @@ static int vorbis_packet(AVFormatContext *s, int idx)
         }
         os->lastpts                 =
         os->lastdts                 = os->granule - duration;
+
+        if (!os->granule && duration) //hack to deal with broken files (Ticket3710)
+            os->lastpts = os->lastdts = AV_NOPTS_VALUE;
+
         if (s->streams[idx]->start_time == AV_NOPTS_VALUE) {
             s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
             if (s->streams[idx]->duration != AV_NOPTS_VALUE)



More information about the ffmpeg-cvslog mailing list