[FFmpeg-cvslog] ffserver: simplify URLContext cleanup

Reynaldo H. Verdejo Pinochet git at videolan.org
Thu Jun 25 00:18:24 CEST 2015


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Tue Jun 23 13:53:43 2015 -0300| [89234deaa2a4c4bac64736c23a50d299ce302a20] | committer: Reynaldo H. Verdejo Pinochet

ffserver: simplify URLContext cleanup

Drop unneeded var and avoid checking for NULL twice as
ffurl_closep() already does this.

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

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

 ffserver.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index fd7d3cb..af1a445 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -786,7 +786,6 @@ static void close_connection(HTTPContext *c)
     HTTPContext **cp, *c1;
     int i, nb_streams;
     AVFormatContext *ctx;
-    URLContext *h;
     AVStream *st;
 
     /* remove connection from list */
@@ -831,9 +830,7 @@ static void close_connection(HTTPContext *c)
             av_freep(&ctx->streams[0]);
             av_freep(&ctx);
         }
-        h = c->rtp_handles[i];
-        if (h)
-            ffurl_close(h);
+        ffurl_close(c->rtp_handles[i]);
     }
 
     ctx = &c->fmt_ctx;



More information about the ffmpeg-cvslog mailing list