summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-07-26 00:20:02 +0300
committerSebastian Dröge <sebastian@centricular.com>2018-07-26 00:20:02 +0300
commit84a956768db79f32bcd064fdf8aa28bd6f10d6e1 (patch)
treefd0e9e23182e5f2b4ce8f66548fb9ccc7fd80d6f
parent9a34dd8c2ab54ae40802d4f2be6eaca6dbdd1950 (diff)
downloadgstreamer-plugins-bad-84a956768db79f32bcd064fdf8aa28bd6f10d6e1.tar.gz
compositor: Don't leak all buffers while crossfading and not all pads are crossfading
-rw-r--r--gst/compositor/compositor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c
index 105fc4057..ec62de51b 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;
}