summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-08-08 19:23:40 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-08-08 19:23:40 +0000
commit2d563d2f8ebbfbbf872b196430b1d98249b9bed8 (patch)
tree0c85308db571d697243e1a0755e2c2b5236b0ba3 /ffserver.c
parent6ff3f3e7cec7cd78a01d0bf76cbccfbe68dc0894 (diff)
cosmetic: simplify some constructs
Originally committed as revision 9989 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/ffserver.c b/ffserver.c
index 47c4bcc5d0..53939b7a64 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -1507,11 +1507,8 @@ static int http_parse_request(HTTPContext *c)
break;
}
- if (wmpc) {
- if (modify_current_stream(wmpc, ratebuf)) {
- wmpc->switch_pending = 1;
- }
- }
+ if (wmpc && modify_current_stream(wmpc, ratebuf))
+ wmpc->switch_pending = 1;
}
snprintf(msg, sizeof(msg), "POST command not handled");
@@ -1840,13 +1837,10 @@ static void compute_stats(HTTPContext *c)
bitrate = 0;
if (c1->stream) {
for (j = 0; j < c1->stream->nb_streams; j++) {
- if (!c1->stream->feed) {
+ if (!c1->stream->feed)
bitrate += c1->stream->streams[j]->codec->bit_rate;
- } else {
- if (c1->feed_streams[j] >= 0) {
- bitrate += c1->stream->feed->streams[c1->feed_streams[j]]->codec->bit_rate;
- }
- }
+ else if (c1->feed_streams[j] >= 0)
+ bitrate += c1->stream->feed->streams[c1->feed_streams[j]]->codec->bit_rate;
}
}