diff options
author | Mike Williams <mike@mikebwilliams.com> | 2011-07-13 14:24:47 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-07-14 14:00:07 -0700 |
commit | 863e2046fdcdf26493effb6e696d98c9dc23b4a7 (patch) | |
tree | 1242776bd09b4385bb40ead62df8b4db5f2769e6 | |
parent | daca33659d12fd85062bc1798f4eb7ffeb83cc3c (diff) | |
download | ffmpeg-863e2046fdcdf26493effb6e696d98c9dc23b4a7.tar.gz |
ffserver: Replace two loops with one loop.
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-rw-r--r-- | ffserver.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ffserver.c b/ffserver.c index ca4b54f4d4..2cbfe7589e 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]); } } } |