fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder

fix leaks in mpp_enc_cfg.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka
2024-11-11 15:27:31 +08:00
parent 57b7952f6a
commit 22959a8080

View File

@@ -889,6 +889,11 @@ static int rkmpp_encode_close(AVCodecContext *avctx)
r->cfg_init = 0;
r->async_frames = 0;
if (r->mcfg) {
mpp_enc_cfg_deinit(r->mcfg);
r->mcfg = NULL;
}
if (r->mapi) {
r->mapi->reset(r->mctx);
mpp_destroy(r->mctx);