mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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
This commit is contained in:
parent
b189e6705a
commit
8767060cd2
2
ffmpeg.c
2
ffmpeg.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user