mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
codec: Plug GPU decoder memory leak
This commit is contained in:
parent
109566fc8f
commit
15f9472b15
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,8 @@ bool Codec::CreateGpuAvDevice() {
|
||||||
LOG_DEBUG(Service_NVDRV, "{} explicitly unsupported", av_hwdevice_get_type_name(type));
|
LOG_DEBUG(Service_NVDRV, "{} explicitly unsupported", av_hwdevice_get_type_name(type));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Avoid memory leak from not cleaning up after av_hwdevice_ctx_create
|
||||||
|
av_buffer_unref(&av_gpu_decoder);
|
||||||
const int hwdevice_res = av_hwdevice_ctx_create(&av_gpu_decoder, type, nullptr, nullptr, 0);
|
const int hwdevice_res = av_hwdevice_ctx_create(&av_gpu_decoder, type, nullptr, nullptr, 0);
|
||||||
if (hwdevice_res < 0) {
|
if (hwdevice_res < 0) {
|
||||||
LOG_DEBUG(Service_NVDRV, "{} av_hwdevice_ctx_create failed {}",
|
LOG_DEBUG(Service_NVDRV, "{} av_hwdevice_ctx_create failed {}",
|
||||||
|
|
Loading…
Reference in a new issue