Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index c4e3099780..2c757bd5a4 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -455,7 +455,10 @@ static void ffmpeg_cleanup(int ret)
/* close files */
for (i = 0; i < nb_output_files; i++) {
OutputFile *of = output_files[i];
- AVFormatContext *s = of->ctx;
+ AVFormatContext *s;
+ if (!of)
+ continue;
+ s = of->ctx;
if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE))
avio_closep(&s->pb);
avformat_free_context(s);