aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-11-05 11:59:47 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-11-05 11:59:47 +0000
commit4fca59f2abeff94f306ccf4a6b232da51c5bad38 (patch)
tree67d431829aa113bb05d77d6dfb855b6f7206c3bb /ffmpeg.c
parent5acdd6e6e2fb181b24e63d0b3ee20dd2fca9478f (diff)
downloadffmpeg-4fca59f2abeff94f306ccf4a6b232da51c5bad38.tar.gz
* fix leak with output file closing
Originally committed as revision 1166 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 53bcc4781f..b9dc932e68 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2567,8 +2567,14 @@ int main(int argc, char **argv)
/* close files */
for(i=0;i<nb_output_files;i++) {
- if (!(output_files[i]->oformat->flags & AVFMT_NOFILE))
- url_fclose(&output_files[i]->pb);
+ /* maybe av_close_output_file ??? */
+ AVFormatContext *s = output_files[i];
+ int j;
+ if (!(s->oformat->flags & AVFMT_NOFILE))
+ url_fclose(&s->pb);
+ for(j=0;j<s->nb_streams;j++)
+ av_free(s->streams[j]);
+ av_free(s);
}
for(i=0;i<nb_input_files;i++)
av_close_input_file(input_files[i]);