aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-05 14:01:44 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-05 14:01:44 +0000
commit3c13202396ec110308ed62656cbbc0e540774f69 (patch)
treefb101f96504795a28a44bed10ed1dd744f000f7c
parent2421a01b258c0a0ba4b6f77289973fff3eba3b29 (diff)
downloadffmpeg-3c13202396ec110308ed62656cbbc0e540774f69.tar.gz
fix memleak, free stream codec allocated by av_new_stream
Originally committed as revision 7225 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index ab0b689a6c..6c3a65b61c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3942,8 +3942,10 @@ int main(int argc, char **argv)
int j;
if (!(s->oformat->flags & AVFMT_NOFILE))
url_fclose(&s->pb);
- for(j=0;j<s->nb_streams;j++)
+ for(j=0;j<s->nb_streams;j++) {
+ av_free(s->streams[j]->codec);
av_free(s->streams[j]);
+ }
av_free(s);
}
for(i=0;i<nb_input_files;i++)