avformat/xmv: factor return check out of if/else
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 6 Nov 2015 01:11:01 +0000 (02:11 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 6 Nov 2015 01:11:01 +0000 (02:11 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/xmv.c

index 45c2464..06c070c 100644 (file)
@@ -549,16 +549,14 @@ 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)
+        return result;
+
 
     /* Increase our counters */
     if (++xmv->current_stream >= xmv->stream_count) {