diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8e7c3125aa..a8af45d0c3 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1030,7 +1030,7 @@ free_and_end: if (HAVE_THREADS && avci->thread_ctx) ff_thread_free(avctx); - if (codec->priv_class && codec->priv_data_size) + if (codec->priv_class && avctx->priv_data) av_opt_free(avctx->priv_data); av_opt_free(avctx);