summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_classes
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2022-03-22 01:22:52 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2022-03-22 01:22:52 +0100
commit15f9472b150e8881f8e034f9571c9aa578b0821c (patch)
treeea9770658ba88a7ecf15c36afebf2f471e5e6e56 /src/video_core/command_classes
parentcodec: Disable HW_FRAMES method check on Windows (diff)
downloadyuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar.gz
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar.bz2
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar.lz
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar.xz
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.tar.zst
yuzu-15f9472b150e8881f8e034f9571c9aa578b0821c.zip
Diffstat (limited to 'src/video_core/command_classes')
-rw-r--r--src/video_core/command_classes/codecs/codec.cpp2
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() {
LOG_DEBUG(Service_NVDRV, "{} explicitly unsupported", av_hwdevice_get_type_name(type));
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);
if (hwdevice_res < 0) {
LOG_DEBUG(Service_NVDRV, "{} av_hwdevice_ctx_create failed {}",