[FFmpeg-devel] [PATCH] avcodec/mfenc: fix memory leak with D3D11 input surfaces
Cameron Gutman
aicommander at gmail.com
Mon Aug 11 00:11:55 EEST 2025
Signed-off-by: Cameron Gutman <aicommander at gmail.com>
---
Please also cherry-pick to release/8.0.
---
libavcodec/mfenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
index 30531fe3e8..949ee684e4 100644
--- a/libavcodec/mfenc.c
+++ b/libavcodec/mfenc.c
@@ -1356,6 +1356,9 @@ static int mf_close(AVCodecContext *avctx)
if (c->async_events)
IMFMediaEventGenerator_Release(c->async_events);
+ if (c->dxgiManager)
+ IMFDXGIDeviceManager_Release(c->dxgiManager);
+
#if !HAVE_UWP
if (c->library)
ff_free_mf(&c->functions, &c->mft);
--
2.50.1.windows.1
More information about the ffmpeg-devel
mailing list