Atrac: Ensure codecCtx doesn't leak.

Although, I don't think we're reallocating it.
This commit is contained in:
Unknown W. Brackets committed 2023-03-15 22:03:21 -07:00
1 parent 6bf5827407
commit 3fcecfa5ec
1 file changed
+5
+5
View File
@@ -1853,6 +1853,11 @@ int __AtracSetContext(Atrac *atrac) {
return hleReportError(ME, ATRAC_ERROR_UNKNOWN_FORMAT, "unknown codec type in set context");
}
if (atrac->codecCtx_) {
// Shouldn't happen, but just in case.
atrac->ReleaseFFMPEGContext();
}
const AVCodec *codec = avcodec_find_decoder(ff_codec);
atrac->codecCtx_ = avcodec_alloc_context3(codec);