Commit bf7aa642 authored by Reinhard Tartler's avatar Reinhard Tartler Committed by Michael Niedermayer

ffserver: cleanup

remove the trivial function do_switch_stream as it doesn't help to make
the code easier to understand.
(cherry picked from commit 305ca590)
parent eddf8f41
...@@ -1192,19 +1192,6 @@ static int modify_current_stream(HTTPContext *c, char *rates) ...@@ -1192,19 +1192,6 @@ static int modify_current_stream(HTTPContext *c, char *rates)
return action_required; return action_required;
} }
static void do_switch_stream(HTTPContext *c, int i)
{
if (c->switch_feed_streams[i] >= 0) {
#ifdef PHILIP
c->feed_streams[i] = c->switch_feed_streams[i];
#endif
/* Now update the stream */
}
c->switch_feed_streams[i] = -1;
}
/* XXX: factorize in utils.c ? */ /* XXX: factorize in utils.c ? */
/* XXX: take care with different space meaning */ /* XXX: take care with different space meaning */
static void skip_spaces(const char **pp) static void skip_spaces(const char **pp)
...@@ -1578,7 +1565,7 @@ static int http_parse_request(HTTPContext *c) ...@@ -1578,7 +1565,7 @@ static int http_parse_request(HTTPContext *c)
if (modify_current_stream(c, ratebuf)) { if (modify_current_stream(c, ratebuf)) {
for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) { for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) {
if (c->switch_feed_streams[i] >= 0) if (c->switch_feed_streams[i] >= 0)
do_switch_stream(c, i); c->switch_feed_streams[i] = -1;
} }
} }
} }
...@@ -2349,7 +2336,7 @@ static int http_prepare_data(HTTPContext *c) ...@@ -2349,7 +2336,7 @@ static int http_prepare_data(HTTPContext *c)
for(i=0;i<c->stream->nb_streams;i++) { for(i=0;i<c->stream->nb_streams;i++) {
if (c->switch_feed_streams[i] == pkt.stream_index) if (c->switch_feed_streams[i] == pkt.stream_index)
if (pkt.flags & AV_PKT_FLAG_KEY) if (pkt.flags & AV_PKT_FLAG_KEY)
do_switch_stream(c, i); c->switch_feed_streams[i] = -1;
if (c->switch_feed_streams[i] >= 0) if (c->switch_feed_streams[i] >= 0)
c->switch_pending = 1; c->switch_pending = 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment