From c2794d1ad04dd5acf3beda79c995d21d851f0305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 2 Jul 2015 18:33:43 -0400 Subject: [PATCH] audiointerleave: Avoid caps processing if not yet negotiated https://bugzilla.gnome.org/show_bug.cgi?id=745768 --- gst/audiomixer/gstaudiointerleave.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/audiomixer/gstaudiointerleave.c b/gst/audiomixer/gstaudiointerleave.c index 01ce19ccaf..39b86e87d6 100644 --- a/gst/audiomixer/gstaudiointerleave.c +++ b/gst/audiomixer/gstaudiointerleave.c @@ -514,6 +514,11 @@ gst_audio_interleave_aggregate (GstAggregator * aggregator, gboolean timeout) GstStructure *s; gboolean ret; + if (self->sinkcaps == NULL || self->channels == 0) { + /* In this case, let the base class handle it */ + goto not_negotiated; + } + srccaps = gst_caps_copy (self->sinkcaps); s = gst_caps_get_structure (srccaps, 0); @@ -535,6 +540,8 @@ gst_audio_interleave_aggregate (GstAggregator * aggregator, gboolean timeout) self->new_caps = FALSE; } + +not_negotiated: GST_OBJECT_UNLOCK (aggregator); return GST_AGGREGATOR_CLASS (parent_class)->aggregate (aggregator, timeout);