oggdec/vorbis: fix stream duration condition
authorHendrik Leppkes <h.leppkes@gmail.com>
Sat, 15 Feb 2014 22:25:33 +0000 (23:25 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Feb 2014 01:30:54 +0000 (02:30 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggparsevorbis.c

index b565232..2739123 100644 (file)
@@ -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;