diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-07-26 00:20:02 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-07-26 02:33:56 +0300 |
commit | 8c48ccab9711a19a647814ab57c00736ae80ffc1 (patch) | |
tree | 098794de2443c5edcc2cf48c35d7fd45152ae42d | |
parent | 9cc6c3383c624b3bdd4d2860b87d8739d8a13aec (diff) | |
download | gstreamer-plugins-bad-8c48ccab9711a19a647814ab57c00736ae80ffc1.tar.gz |
compositor: Don't leak all buffers while crossfading and not all pads are crossfading
-rw-r--r-- | gst/compositor/compositor.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index caa19f8e0..e90058094 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -1005,8 +1005,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; } |