From 61ada2c1dc120403d33cb76ce54a3263960b7d02 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 12 Apr 2022 22:25:21 +0200 Subject: [PATCH] cellVdec: call av_dict_free --- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index e72f6b8ab9..1962c462cf 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -268,6 +268,8 @@ struct vdec_context final fmt::throw_exception("avcodec_open2() failed (err=0x%x='%s', opts=%s)", err, utils::av_error_to_string(err), dict_content); } + av_dict_free(&opts); + seq_state = sequence_state::dormant; } @@ -412,12 +414,10 @@ struct vdec_context final { break; } - else - { - char av_error[AV_ERROR_MAX_STRING_SIZE]; - av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret); - fmt::throw_exception("AU decoding error(0x%x): %s", ret, av_error); - } + + char av_error[AV_ERROR_MAX_STRING_SIZE]{}; + av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret); + fmt::throw_exception("AU decoding error(0x%x): %s", ret, av_error); } if (frame->interlaced_frame)