Commit 4fca59f2 authored by Zdenek Kabelac's avatar Zdenek Kabelac
Browse files

* fix leak with output file closing

Originally committed as revision 1166 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5acdd6e6
...@@ -2567,8 +2567,14 @@ int main(int argc, char **argv) ...@@ -2567,8 +2567,14 @@ int main(int argc, char **argv)
/* close files */ /* close files */
for(i=0;i<nb_output_files;i++) { for(i=0;i<nb_output_files;i++) {
if (!(output_files[i]->oformat->flags & AVFMT_NOFILE)) /* maybe av_close_output_file ??? */
url_fclose(&output_files[i]->pb); 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++) for(i=0;i<nb_input_files;i++)
av_close_input_file(input_files[i]); av_close_input_file(input_files[i]);
......
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