[FFmpeg-cvslog] ffserver: Replace two loops with one loop.

Mike Williams git at videolan.org
Fri Jul 15 17:58:58 CEST 2011


ffmpeg | branch: master | Mike Williams <mike at mikebwilliams.com> | Wed Jul 13 14:24:47 2011 -0400| [863e2046fdcdf26493effb6e696d98c9dc23b4a7] | committer: Ronald S. Bultje

ffserver: Replace two loops with one loop.

Signed-off-by: Mike Williams <mike at mikebwilliams.com>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>

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

 ffserver.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index ca4b54f..2cbfe75 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3648,21 +3648,13 @@ static void build_feed_streams(void)
     for(stream = first_stream; stream != NULL; stream = stream->next) {
         feed = stream->feed;
         if (feed) {
-            if (!stream->is_feed) {
-                /* 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]);
-            }
-        }
-    }
-
-    /* gather all streams */
-    for(stream = first_stream; stream != NULL; 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]);
             }
         }
     }



More information about the ffmpeg-cvslog mailing list