From 43620e1642e0f332dc58093ba31a8f8e1689c7ee Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 23 Apr 2013 11:17:05 +0200 Subject: [PATCH] pad: notify caps property on NULL as well Also notify the caps property when it changes to NULL --- gst/gstpad.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index dae9210..01f439a 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -371,7 +371,19 @@ remove_events (GstPad * pad) len = events->len; for (i = 0; i < len; i++) { PadEvent *ev = &g_array_index (events, PadEvent, i); - gst_event_unref (ev->event); + GstEvent *event = ev->event; + + ev->event = NULL; + + if (event && GST_EVENT_TYPE (event) == GST_EVENT_CAPS) { + GST_OBJECT_UNLOCK (pad); + + GST_DEBUG_OBJECT (pad, "notify caps"); + g_object_notify_by_pspec ((GObject *) pad, pspec_caps); + + GST_OBJECT_LOCK (pad); + } + gst_event_unref (event); } GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PENDING_EVENTS); g_array_set_size (events, 0); -- 2.7.4