aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Williams <mike@mikebwilliams.com>2011-07-13 14:24:47 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2011-07-14 14:00:07 -0700
commit863e2046fdcdf26493effb6e696d98c9dc23b4a7 (patch)
tree1242776bd09b4385bb40ead62df8b4db5f2769e6
parentdaca33659d12fd85062bc1798f4eb7ffeb83cc3c (diff)
downloadffmpeg-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.c16
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]);
}
}
}