Browse code

ffserver: drop unneeded else branching

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>

Reynaldo H. Verdejo Pinochet authored on 2015/06/22 06:43:13
Showing 1 changed files
... ...
@@ -2220,17 +2220,16 @@ static int http_prepare_data(HTTPContext *c)
2220 2220
                 } else if (ret == AVERROR(EAGAIN)) {
2221 2221
                     /* input not ready, come back later */
2222 2222
                     return 0;
2223
+                }
2224
+                if (c->stream->loop) {
2225
+                    avformat_close_input(&c->fmt_in);
2226
+                    if (open_input_stream(c, "") < 0)
2227
+                        goto no_loop;
2228
+                    goto redo;
2223 2229
                 } else {
2224
-                    if (c->stream->loop) {
2225
-                        avformat_close_input(&c->fmt_in);
2226
-                        if (open_input_stream(c, "") < 0)
2227
-                            goto no_loop;
2228
-                        goto redo;
2229
-                    } else {
2230 2230
                     no_loop:
2231 2231
                         /* must send trailer now because EOF or error */
2232 2232
                         c->state = HTTPSTATE_SEND_DATA_TRAILER;
2233
-                    }
2234 2233
                 }
2235 2234
             } else {
2236 2235
                 int source_index = pkt.stream_index;