From 84a956768db79f32bcd064fdf8aa28bd6f10d6e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 26 Jul 2018 00:20:02 +0300 Subject: [PATCH] compositor: Don't leak all buffers while crossfading and not all pads are crossfading --- gst/compositor/compositor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index 105fc40..ec62de5 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -833,8 +833,13 @@ gst_compositor_fill_transparent (GstCompositor * self, GstVideoFrame * frame, if (!gst_video_frame_map (nframe, &frame->info, cbuffer, GST_MAP_WRITE)) { GST_WARNING_OBJECT (self, "Could not map output buffer"); + gst_buffer_unref (cbuffer); return GST_FLOW_ERROR; } + + /* the last reference is owned by the frame and released once the frame + * is unmapped. We leak it if we don't unref here */ + gst_buffer_unref (cbuffer); } else { nframe = frame; } -- 2.7.4