summaryrefslogtreecommitdiff
path: root/gst/compositor/compositor.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-12-18 11:48:37 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-12-18 11:49:09 +0100
commitccaf07d53db738170b76e6258c8cb79505ebc9cb (patch)
tree448f956b8685794bb44f9a2223a56524ceca7c02 /gst/compositor/compositor.c
parentfe31238f5da97162899c7dae7b915ed85d3989b6 (diff)
downloadgstreamer-plugins-bad-ccaf07d53db738170b76e6258c8cb79505ebc9cb.tar.gz
compositor: Fix memory leak when no buffer is available for a pad currently
CID 1258718
Diffstat (limited to 'gst/compositor/compositor.c')
-rw-r--r--gst/compositor/compositor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c
index c5d09011c..06d96bfce 100644
--- a/gst/compositor/compositor.c
+++ b/gst/compositor/compositor.c
@@ -276,13 +276,15 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
guint outsize;
GstVideoFrame *converted_frame;
GstBuffer *converted_buf = NULL;
- GstVideoFrame *frame = g_slice_new0 (GstVideoFrame);
+ GstVideoFrame *frame;
static GstAllocationParams params = { 0, 15, 0, 0, };
gint width, height;
if (!pad->buffer)
return TRUE;
+ frame = g_slice_new0 (GstVideoFrame);
+
if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
GST_MAP_READ)) {
GST_WARNING_OBJECT (vagg, "Could not map input buffer");