Commit cfc3b9e7 authored by philipjsg's avatar philipjsg

Try to eliminate memory leak on stream termination. It doesn't crash, but I'm

not sure if it fixes the problem.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1620 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 31fcc0c3
......@@ -743,6 +743,17 @@ static void close_connection(HTTPContext *c)
}
}
if (!c->last_packet_sent) {
ctx = &c->fmt_ctx;
if (ctx->oformat) {
/* prepare header */
if (url_open_dyn_buf(&ctx->pb) >= 0) {
av_write_trailer(ctx);
(void) url_close_dyn_buf(&ctx->pb, &c->pb_buffer);
}
}
}
if (c->stream)
current_bandwidth -= c->stream->bandwidth;
av_freep(&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