]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparsevp8.c
Don't manipulate duration when it's AV_NOPTS_VALUE.
[ffmpeg] / libavformat / oggparsevp8.c
index c534ab117d94e2aee590f03641681d5031aa83c4..b76ac71cc5075079fe80607b4d94d3afd16d92be 100644 (file)
@@ -125,7 +125,7 @@ static int vp8_packet(AVFormatContext *s, int idx)
         os->lastdts = vp8_gptopts(s, idx, os->granule, NULL) - duration;
         if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
             s->streams[idx]->start_time = os->lastpts;
-            if (s->streams[idx]->duration)
+            if (s->streams[idx]->duration && s->streams[idx]->duration != AV_NOPTS_VALUE)
                 s->streams[idx]->duration -= s->streams[idx]->start_time;
         }
     }