0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-31 10:41:48 +00:00
Lakka-LibreELEC/projects/Amlogic/patches/ffmpeg/ffmpeg-0005-drm_vout-Fix-connector-etc.-desc-memory-leak.patch
Christian Hewitt 23942f808a ffmpeg: update Amlogic patches with recent commits from test/5.1.4/main
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2024-03-24 14:58:21 +00:00

31 lines
904 B
Diff

From 613e5cbb5e0a7626377876e9a441c614afe1e25e Mon Sep 17 00:00:00 2001
From: John Cox <jc@kynesim.co.uk>
Date: Tue, 30 Jan 2024 14:24:59 +0000
Subject: [PATCH 05/14] drm_vout: Fix connector etc. desc memory leak
---
libavdevice/drm_vout.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavdevice/drm_vout.c b/libavdevice/drm_vout.c
index 491e1dc608..275748abdc 100644
--- a/libavdevice/drm_vout.c
+++ b/libavdevice/drm_vout.c
@@ -501,6 +501,13 @@ static int find_crtc(struct AVFormatContext * const avctx, int drmfd, struct drm
crtc ? crtc->height : 0,
(s->conId == (int)con->connector_id ?
" (chosen)" : ""));
+
+ if (crtc)
+ drmModeFreeCrtc(crtc);
+ if (enc)
+ drmModeFreeEncoder(enc);
+ if (con)
+ drmModeFreeConnector(con);
}
if (!s->conId) {
--
2.34.1