diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index a4711f93d9..62cf167328 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -85,8 +85,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h); end: - if (codec_ctx) - avcodec_close(codec_ctx); + avcodec_close(codec_ctx); if (format_ctx) avformat_close_input(&format_ctx); av_freep(&frame);