ffserver: drop unneeded else branching
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 21 Jun 2015 21:43:13 +0000 (18:43 -0300)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 21 Jun 2015 22:06:00 +0000 (19:06 -0300)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
ffserver.c

index 3efa48b..2de35ba 100644 (file)
@@ -2220,17 +2220,16 @@ static int http_prepare_data(HTTPContext *c)
                 } else if (ret == AVERROR(EAGAIN)) {
                     /* input not ready, come back later */
                     return 0;
+                }
+                if (c->stream->loop) {
+                    avformat_close_input(&c->fmt_in);
+                    if (open_input_stream(c, "") < 0)
+                        goto no_loop;
+                    goto redo;
                 } else {
-                    if (c->stream->loop) {
-                        avformat_close_input(&c->fmt_in);
-                        if (open_input_stream(c, "") < 0)
-                            goto no_loop;
-                        goto redo;
-                    } else {
                     no_loop:
                         /* must send trailer now because EOF or error */
                         c->state = HTTPSTATE_SEND_DATA_TRAILER;
-                    }
                 }
             } else {
                 int source_index = pkt.stream_index;