Browse Source

ffserver: drop unneeded else branching

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reynaldo H. Verdejo Pinochet 9 years ago
parent
commit
758c7a5cbc
1 changed files with 6 additions and 7 deletions
  1. 6 7
      ffserver.c

+ 6 - 7
ffserver.c

@@ -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;