From 45581ed15d2ad5955e24d809820c1675da68f500 Mon Sep 17 00:00:00 2001
From: Hendrik Leppkes <h.leppkes@gmail.com>
Date: Sat, 15 Feb 2014 23:25:33 +0100
Subject: [PATCH] oggdec/vorbis: fix stream duration condition

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavformat/oggparsevorbis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index b5652322759..27391233897 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;
-- 
GitLab