Commit a131e378 authored by ramiro's avatar ramiro

Fix bug introduced by r12827.

If av_exit() was called after an AVFormatContext was created, but before
its file was opened, av_exit() would pass a NULL pointer to url_fclose().

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12915 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7e8f79bf
...@@ -380,7 +380,7 @@ static int av_exit(int ret) ...@@ -380,7 +380,7 @@ static int av_exit(int ret)
/* maybe av_close_output_file ??? */ /* maybe av_close_output_file ??? */
AVFormatContext *s = output_files[i]; AVFormatContext *s = output_files[i];
int j; int j;
if (!(s->oformat->flags & AVFMT_NOFILE)) if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
url_fclose(s->pb); 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]->codec);
......
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