[FFmpeg-cvslog] ffserver: reflow close_connection()

Reynaldo H. Verdejo Pinochet git at videolan.org
Fri Dec 26 23:05:00 CET 2014


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Fri Dec 26 18:43:40 2014 -0300| [0121ddabb8677730f415115c8f9d50e27269111e] | committer: Reynaldo H. Verdejo Pinochet

ffserver: reflow close_connection()

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

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

 ffserver.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 7ddacd2..044bf6f 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -836,13 +836,11 @@ static void close_connection(HTTPContext *c)
     ctx = &c->fmt_ctx;
 
     if (!c->last_packet_sent && c->state == HTTPSTATE_SEND_DATA_TRAILER) {
-        if (ctx->oformat) {
-            /* prepare header */
-            if (avio_open_dyn_buf(&ctx->pb) >= 0) {
-                av_write_trailer(ctx);
-                av_freep(&c->pb_buffer);
-                avio_close_dyn_buf(ctx->pb, &c->pb_buffer);
-            }
+        /* prepare header */
+        if (ctx->oformat && avio_open_dyn_buf(&ctx->pb) >= 0) {
+            av_write_trailer(ctx);
+            av_freep(&c->pb_buffer);
+            avio_close_dyn_buf(ctx->pb, &c->pb_buffer);
         }
     }
 



More information about the ffmpeg-cvslog mailing list