ffserver: make statement block unconditional by exiting early
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Wed, 24 Jun 2015 21:57:42 +0000 (18:57 -0300)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Wed, 24 Jun 2015 22:17:51 +0000 (19:17 -0300)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
ffserver.c

index 1be545f..b9b6d96 100644 (file)
@@ -3594,16 +3594,17 @@ static void build_feed_streams(void)
     /* gather all streams */
     for(stream = config.first_stream; stream; stream = stream->next) {
         feed = stream->feed;
-        if (feed) {
-            if (stream->is_feed) {
-                for(i=0;i<stream->nb_streams;i++)
-                    stream->feed_streams[i] = i;
-            } else {
-                /* we handle a stream coming from a feed */
-                for(i=0;i<stream->nb_streams;i++)
-                    stream->feed_streams[i] = add_av_stream(feed,
-                                                            stream->streams[i]);
-            }
+        if (!feed)
+            continue;
+
+        if (stream->is_feed) {
+            for(i=0;i<stream->nb_streams;i++)
+                stream->feed_streams[i] = i;
+        } else {
+            /* we handle a stream coming from a feed */
+            for(i=0;i<stream->nb_streams;i++)
+                stream->feed_streams[i] = add_av_stream(feed,
+                                                        stream->streams[i]);
         }
     }