diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 023ea1d557..4299a44b65 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1498,8 +1498,8 @@ free_and_end: av_dict_free(&tmp); av_freep(&avctx->priv_data); if (avctx->internal) { - av_freep(&avctx->internal->pool); av_frame_free(&avctx->internal->to_free); + av_freep(&avctx->internal->pool); } av_freep(&avctx->internal); avctx->codec = NULL;