From 0b23d28164eafba370dffec4227828689607e611 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 23 Sep 2022 02:17:04 +0200 Subject: [PATCH] ffmpeg/hwapi/d3d11: Remove double unref --- source/ffmpeg/hwapi/d3d11.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index 16b6677..1d2bb38 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -188,10 +188,7 @@ std::shared_ptr d3d11_instance::allocate_frame(AVBufferRef* frames) auto gctx = streamfx::obs::gs::context(); // Allocate a frame. - auto frame = std::shared_ptr(av_frame_alloc(), [](AVFrame* frame) { - av_frame_unref(frame); - av_frame_free(&frame); - }); + auto frame = std::shared_ptr(av_frame_alloc(), [](AVFrame* frame) { av_frame_free(&frame); }); // Create the necessary buffers. if (av_hwframe_get_buffer(frames, frame.get(), 0) < 0) {