From e1f3214c6ce91d3c34366d30636d4df74a4fe4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 Jan 2015 14:54:26 +0100 Subject: [PATCH] compositor: Don't do any conversions if the pad is completely transparent anyway --- gst/compositor/compositor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index ba08556590..d3fa3f07b8 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -390,7 +390,12 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad, g_free (wanted_colorimetry); } - if (cpad->convert) { + if (cpad->alpha == 0.0) { + GST_DEBUG_OBJECT (vagg, "Pad has alpha 0.0, not converting frame"); + converted_frame = NULL; + gst_video_frame_unmap (frame); + g_slice_free (GstVideoFrame, frame); + } else if (cpad->convert) { gint converted_size; converted_frame = g_slice_new0 (GstVideoFrame);