summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-01-13 14:54:26 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-01-13 14:54:26 +0100
commitddb535c35d5f5029d02659f7f46de4a84f515e21 (patch)
tree49ee6b20ef5cff3e68830af791eaeda0d2789c53
parent45b095c66644539b43d814c6bfefaf259e3bdac2 (diff)
downloadgstreamer-plugins-bad-ddb535c35d5f5029d02659f7f46de4a84f515e21.tar.gz
compositor: Don't do any conversions if the pad is completely transparent anyway
-rw-r--r--gst/compositor/compositor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c
index ba0855659..d3fa3f07b 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);