[FFmpeg-cvslog] ffserver: drop unneeded else branching

Reynaldo H. Verdejo Pinochet git at videolan.org
Mon Jun 22 00:06:25 CEST 2015


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Sun Jun 21 18:43:13 2015 -0300| [758c7a5cbc30d7fe40839e11f18f50a73011366b] | committer: Reynaldo H. Verdejo Pinochet

ffserver: drop unneeded else branching

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=758c7a5cbc30d7fe40839e11f18f50a73011366b
---

 ffserver.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 3efa48b..2de35ba 100644
--- a/ffserver.c
+++ b/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;



More information about the ffmpeg-cvslog mailing list