Browse code

ffserver: cleanup

remove the trivial function do_switch_stream as it doesn't help to make
the code easier to understand.

Reinhard Tartler authored on 2011/01/23 16:53:40
Showing 1 changed files
... ...
@@ -1192,19 +1192,6 @@ static int modify_current_stream(HTTPContext *c, char *rates)
1192 1192
     return action_required;
1193 1193
 }
1194 1194
 
1195
-
1196
-static void do_switch_stream(HTTPContext *c, int i)
1197
-{
1198
-    if (c->switch_feed_streams[i] >= 0) {
1199
-#ifdef PHILIP
1200
-        c->feed_streams[i] = c->switch_feed_streams[i];
1201
-#endif
1202
-
1203
-        /* Now update the stream */
1204
-    }
1205
-    c->switch_feed_streams[i] = -1;
1206
-}
1207
-
1208 1195
 /* XXX: factorize in utils.c ? */
1209 1196
 /* XXX: take care with different space meaning */
1210 1197
 static void skip_spaces(const char **pp)
... ...
@@ -1578,7 +1565,7 @@ static int http_parse_request(HTTPContext *c)
1578 1578
         if (modify_current_stream(c, ratebuf)) {
1579 1579
             for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) {
1580 1580
                 if (c->switch_feed_streams[i] >= 0)
1581
-                    do_switch_stream(c, i);
1581
+                    c->switch_feed_streams[i] = -1;
1582 1582
             }
1583 1583
         }
1584 1584
     }
... ...
@@ -2349,7 +2336,7 @@ static int http_prepare_data(HTTPContext *c)
2349 2349
                         for(i=0;i<c->stream->nb_streams;i++) {
2350 2350
                             if (c->switch_feed_streams[i] == pkt.stream_index)
2351 2351
                                 if (pkt.flags & AV_PKT_FLAG_KEY)
2352
-                                    do_switch_stream(c, i);
2352
+                                    c->switch_feed_streams[i] = -1;
2353 2353
                             if (c->switch_feed_streams[i] >= 0)
2354 2354
                                 c->switch_pending = 1;
2355 2355
                         }