Commit 8767060c authored by Ramiro Polla's avatar Ramiro Polla

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().

Originally committed as revision 12915 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b189e670
......@@ -380,7 +380,7 @@ static int av_exit(int ret)
/* maybe av_close_output_file ??? */
AVFormatContext *s = output_files[i];
int j;
if (!(s->oformat->flags & AVFMT_NOFILE))
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
url_fclose(s->pb);
for(j=0;j<s->nb_streams;j++) {
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