ffserver: simplify URLContext cleanup

Drop unneeded var and avoid checking for NULL twice as
ffurl_closep() already does this.
Signed-off-by: 's avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
parent 766a8346
...@@ -786,7 +786,6 @@ static void close_connection(HTTPContext *c) ...@@ -786,7 +786,6 @@ static void close_connection(HTTPContext *c)
HTTPContext **cp, *c1; HTTPContext **cp, *c1;
int i, nb_streams; int i, nb_streams;
AVFormatContext *ctx; AVFormatContext *ctx;
URLContext *h;
AVStream *st; AVStream *st;
/* remove connection from list */ /* remove connection from list */
...@@ -831,9 +830,7 @@ static void close_connection(HTTPContext *c) ...@@ -831,9 +830,7 @@ static void close_connection(HTTPContext *c)
av_freep(&ctx->streams[0]); av_freep(&ctx->streams[0]);
av_freep(&ctx); av_freep(&ctx);
} }
h = c->rtp_handles[i]; ffurl_close(c->rtp_handles[i]);
if (h)
ffurl_close(h);
} }
ctx = &c->fmt_ctx; ctx = &c->fmt_ctx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment