diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/command_classes/codecs/codec.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp index 921f54a41..c9ab11e53 100644 --- a/src/video_core/command_classes/codecs/codec.cpp +++ b/src/video_core/command_classes/codecs/codec.cpp | |||
| @@ -98,6 +98,8 @@ bool Codec::CreateGpuAvDevice() { | |||
| 98 | LOG_DEBUG(Service_NVDRV, "{} explicitly unsupported", av_hwdevice_get_type_name(type)); | 98 | LOG_DEBUG(Service_NVDRV, "{} explicitly unsupported", av_hwdevice_get_type_name(type)); |
| 99 | continue; | 99 | continue; |
| 100 | } | 100 | } |
| 101 | // Avoid memory leak from not cleaning up after av_hwdevice_ctx_create | ||
| 102 | av_buffer_unref(&av_gpu_decoder); | ||
| 101 | const int hwdevice_res = av_hwdevice_ctx_create(&av_gpu_decoder, type, nullptr, nullptr, 0); | 103 | const int hwdevice_res = av_hwdevice_ctx_create(&av_gpu_decoder, type, nullptr, nullptr, 0); |
| 102 | if (hwdevice_res < 0) { | 104 | if (hwdevice_res < 0) { |
| 103 | LOG_DEBUG(Service_NVDRV, "{} av_hwdevice_ctx_create failed {}", | 105 | LOG_DEBUG(Service_NVDRV, "{} av_hwdevice_ctx_create failed {}", |