summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 333f786cf3..5161565110 100644
--- a/ffmpeg.c
+++ b/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);