mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-29 12:26:20 +08: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:
2
ffmpeg.c
2
ffmpeg.c
@ -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);
|
||||||
|
Reference in New Issue
Block a user