Browse Source

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@osg.samsung.com>
Reynaldo H. Verdejo Pinochet 9 years ago
parent
commit
89234deaa2
1 changed files with 1 additions and 4 deletions
  1. 1 4
      ffserver.c

+ 1 - 4
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;