do not allocate st->codec, it will be overwritten later; fix memleak

Originally committed as revision 13870 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Baptiste Coudurier 17 years ago
parent d2ce2f5e5c
commit 381ec67749
  1. 1
      ffserver.c

@ -2047,7 +2047,6 @@ static int http_prepare_data(HTTPContext *c)
AVStream *st; AVStream *st;
AVStream *src; AVStream *src;
st = av_mallocz(sizeof(AVStream)); st = av_mallocz(sizeof(AVStream));
st->codec= avcodec_alloc_context();
c->fmt_ctx.streams[i] = st; c->fmt_ctx.streams[i] = st;
/* if file or feed, then just take streams from FFStream struct */ /* if file or feed, then just take streams from FFStream struct */
if (!c->stream->feed || if (!c->stream->feed ||

Loading…
Cancel
Save