ffserver: reflow close_connection()

Signed-off-by: 's avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
parent 11462236
...@@ -836,13 +836,11 @@ static void close_connection(HTTPContext *c) ...@@ -836,13 +836,11 @@ static void close_connection(HTTPContext *c)
ctx = &c->fmt_ctx; ctx = &c->fmt_ctx;
if (!c->last_packet_sent && c->state == HTTPSTATE_SEND_DATA_TRAILER) { if (!c->last_packet_sent && c->state == HTTPSTATE_SEND_DATA_TRAILER) {
if (ctx->oformat) { /* prepare header */
/* prepare header */ if (ctx->oformat && avio_open_dyn_buf(&ctx->pb) >= 0) {
if (avio_open_dyn_buf(&ctx->pb) >= 0) { av_write_trailer(ctx);
av_write_trailer(ctx); av_freep(&c->pb_buffer);
av_freep(&c->pb_buffer); avio_close_dyn_buf(ctx->pb, &c->pb_buffer);
avio_close_dyn_buf(ctx->pb, &c->pb_buffer);
}
} }
} }
......
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