[FFmpeg-devel] [PATCH] oggdec/vorbis: fix stream duration condition

Hendrik Leppkes h.leppkes at gmail.com
Sat Feb 15 23:25:33 CET 2014


---
 libavformat/oggparsevorbis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 05c6146..06fdc53 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -421,7 +421,7 @@ static int vorbis_packet(AVFormatContext *s, int idx)
         os->lastdts                 = os->granule - duration;
         if (s->streams[idx]->start_time == AV_NOPTS_VALUE) {
             s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
-            if (s->streams[idx]->duration)
+            if (s->streams[idx]->duration != AV_NOPTS_VALUE)
                 s->streams[idx]->duration -= s->streams[idx]->start_time;
         }
         priv->final_pts          = AV_NOPTS_VALUE;
-- 
1.8.5.2.msysgit.0



More information about the ffmpeg-devel mailing list