mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 20:04:31 +01:00
Atrac: Ensure codecCtx doesn't leak.
Although, I don't think we're reallocating it.
This commit is contained in:
1 parent
6bf5827407
commit
3fcecfa5ec
1 file changed
+5
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user