X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg.c;h=e199a10ef463f43cce21757b44769aae24f16f1a;hb=28bf0d94aaf577e3ff593cfaa831f467cf2568e2;hp=c9ac577dd2ce1050aaf85fdb86c9cbc2c34f04ae;hpb=45a73d2b472ffcc0d87f3efae3424c44976d6935;p=ffmpeg diff --git a/ffmpeg.c b/ffmpeg.c index c9ac577dd2c..e199a10ef46 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -454,7 +454,7 @@ static void exit_program(void) /* close files */ for (i = 0; i < nb_output_files; i++) { AVFormatContext *s = output_files[i]->ctx; - if (s && !(s->oformat->flags & AVFMT_NOFILE) && s->pb) + if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE) && s->pb) avio_close(s->pb); avformat_free_context(s); av_dict_free(&output_files[i]->opts);