[FFmpeg-devel] [PATCH] ffserver: cleanup
Reinhard Tartler
siretart
Sun Mar 22 19:08:41 CET 2009
From: Reinhard Tartler <siretart at tauware.de>
Date: Sun, 22 Mar 2009 19:03:56 +0100
Subject: [PATCH] ffserver: cleanup
remove the trivial function do_switch_stream as it doesn't help to make
the code easier to understand.
---
ffserver.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index 61ecf20..350a421 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -1150,19 +1150,6 @@ static int modify_current_stream(HTTPContext *c, char *rates)
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: take care with different space meaning */
static void skip_spaces(const char **pp)
@@ -1369,7 +1356,7 @@ static int http_parse_request(HTTPContext *c)
if (modify_current_stream(c, ratebuf)) {
for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) {
if (c->switch_feed_streams[i] >= 0)
- do_switch_stream(c, i);
+ c->switch_feed_streams[i] = -1;
}
}
}
@@ -2171,7 +2158,7 @@ static int http_prepare_data(HTTPContext *c)
for(i=0;i<c->stream->nb_streams;i++) {
if (c->switch_feed_streams[i] == pkt.stream_index)
if (pkt.flags & PKT_FLAG_KEY)
- do_switch_stream(c, i);
+ c->switch_feed_streams[i] = -1;
if (c->switch_feed_streams[i] >= 0)
c->switch_pending = 1;
}
--
1.5.6.3
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
More information about the ffmpeg-devel
mailing list