]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/xmv.c
Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
[ffmpeg] / libavformat / xmv.c
index 45c24642cc042683831f23a63a235cbf29161a7c..14d007a3e0b81f644ef82c78519f3a4e8dd57fe7 100644 (file)
@@ -549,16 +549,17 @@ static int xmv_read_packet(AVFormatContext *s,
         /* Fetch a video frame */
 
         result = xmv_fetch_video_packet(s, pkt);
-        if (result)
-            return result;
-
     } else {
         /* Fetch an audio frame */
 
         result = xmv_fetch_audio_packet(s, pkt, xmv->current_stream - 1);
-        if (result)
-            return result;
     }
+    if (result) {
+        xmv->current_stream = 0;
+        xmv->video.current_frame = xmv->video.frame_count;
+        return result;
+    }
+
 
     /* Increase our counters */
     if (++xmv->current_stream >= xmv->stream_count) {