avcodec/ratecontrol: Fix double free on error

Happens on init_pass2() failure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-04 18:48:14 +02:00
parent bdd3c6ca50
commit ba28222a14
1 changed files with 1 additions and 0 deletions

View File

@ -694,6 +694,7 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s)
emms_c();
av_expr_free(rcc->rc_eq_eval);
rcc->rc_eq_eval = NULL;
av_freep(&rcc->entry);
}