[FFmpeg-cvslog] avformat/xmv: factor return check out of if/else

Michael Niedermayer git at videolan.org
Sun Dec 6 12:57:15 CET 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov  6 02:11:01 2015 +0100| [a3ff74c872ab7fe1e7a9ad32b2622d4aa18aea50] | committer: Michael Niedermayer

avformat/xmv: factor return check out of if/else

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9b6fac11da470274d4b93d46ef66527aa1824179)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3ff74c872ab7fe1e7a9ad32b2622d4aa18aea50
---

 libavformat/xmv.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index 6eac4d2..cee2c80 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -547,16 +547,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) {



More information about the ffmpeg-cvslog mailing list