diff options
author | Philip Gladstone <philipjsg@users.sourceforge.net> | 2003-04-12 02:27:54 +0000 |
---|---|---|
committer | Philip Gladstone <philipjsg@users.sourceforge.net> | 2003-04-12 02:27:54 +0000 |
commit | f0ef62405770cfa52124f4569a3deda206cccda9 (patch) | |
tree | b3557f8ee9b797ba36df71c06c7e36cd39bfb22d /ffserver.c | |
parent | 37b787f124a3a5025253858d1dd1ec30f1e263e4 (diff) | |
download | ffmpeg-f0ef62405770cfa52124f4569a3deda206cccda9.tar.gz |
Applied Roumen Petrov patch to fix crash/memory leak
Originally committed as revision 1758 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index ceca3df824..5f5b37408e 100644 --- a/ffserver.c +++ b/ffserver.c @@ -748,9 +748,6 @@ static void close_connection(HTTPContext *c) ctx = &c->fmt_ctx; - for(i=0; i<ctx->nb_streams; i++) - av_free(ctx->streams[i]) ; - if (!c->last_packet_sent) { if (ctx->oformat) { /* prepare header */ @@ -761,6 +758,9 @@ static void close_connection(HTTPContext *c) } } + for(i=0; i<ctx->nb_streams; i++) + av_free(ctx->streams[i]) ; + if (c->stream) current_bandwidth -= c->stream->bandwidth; av_freep(&c->pb_buffer); |