mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-09 13:21:16 +00:00
compositor: Fix memory leak when no buffer is available for a pad currently
CID 1258718
This commit is contained in:
parent
6f0eb92d72
commit
a64445e543
1 changed files with 3 additions and 1 deletions
|
@ -276,13 +276,15 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
|
||||||
guint outsize;
|
guint outsize;
|
||||||
GstVideoFrame *converted_frame;
|
GstVideoFrame *converted_frame;
|
||||||
GstBuffer *converted_buf = NULL;
|
GstBuffer *converted_buf = NULL;
|
||||||
GstVideoFrame *frame = g_slice_new0 (GstVideoFrame);
|
GstVideoFrame *frame;
|
||||||
static GstAllocationParams params = { 0, 15, 0, 0, };
|
static GstAllocationParams params = { 0, 15, 0, 0, };
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
|
||||||
if (!pad->buffer)
|
if (!pad->buffer)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
frame = g_slice_new0 (GstVideoFrame);
|
||||||
|
|
||||||
if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
|
if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
|
||||||
GST_MAP_READ)) {
|
GST_MAP_READ)) {
|
||||||
GST_WARNING_OBJECT (vagg, "Could not map input buffer");
|
GST_WARNING_OBJECT (vagg, "Could not map input buffer");
|
||||||
|
|
Loading…
Reference in a new issue