changeset 3861:a0098594ab90 libavformat

Remove useless "else" case in if X { A; return }; else { B }. See discussion in "Realmedia patch" thread on mailinglist.
author rbultje
date Mon, 01 Sep 2008 13:51:24 +0000
parents d8fce96bb3ab
children c11ff84634b2
files rtsp.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rtsp.c	Mon Sep 01 13:47:53 2008 +0000
+++ b/rtsp.c	Mon Sep 01 13:51:24 2008 +0000
@@ -1343,10 +1343,9 @@
     rtsp_send_cmd(s, cmd, reply, NULL);
     if (reply->status_code != RTSP_STATUS_OK) {
         return -1;
-    } else {
-        rt->state = RTSP_STATE_PLAYING;
-        return 0;
     }
+    rt->state = RTSP_STATE_PLAYING;
+    return 0;
 }
 
 /* pause the stream */
@@ -1367,10 +1366,9 @@
     rtsp_send_cmd(s, cmd, reply, NULL);
     if (reply->status_code != RTSP_STATUS_OK) {
         return -1;
-    } else {
-        rt->state = RTSP_STATE_PAUSED;
-        return 0;
     }
+    rt->state = RTSP_STATE_PAUSED;
+    return 0;
 }
 
 static int rtsp_read_seek(AVFormatContext *s, int stream_index,