pad: notify caps property on NULL as well

Also notify the caps property when it changes to NULL
This commit is contained in:
Wim Taymans 2013-04-23 11:17:05 +02:00
parent 49c9d2f229
commit 43620e1642

View file

@ -371,7 +371,19 @@ remove_events (GstPad * pad)
len = events->len; len = events->len;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
PadEvent *ev = &g_array_index (events, PadEvent, 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); GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_PENDING_EVENTS);
g_array_set_size (events, 0); g_array_set_size (events, 0);