Commit 9bc26c5f authored by Arnaud Vrac's avatar Arnaud Vrac Committed by Sebastian Dröge

input-selector: Fix missing pad activation notification

A new active pad might not be notified in some cases, which results
in the current track number not being set in playbin.

The active-pad notification is only sent in the chain and sink_event
functions, and only when the buffer or event that triggered the active
pad selection is from the newly activated pad. So in the other case
the notification will never be sent.

https://bugzilla.gnome.org/show_bug.cgi?id=704691
parent 0c513e3d
......@@ -461,7 +461,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
active_sinkpad = gst_input_selector_activate_sinkpad (sel, pad);
GST_INPUT_SELECTOR_UNLOCK (sel);
if (prev_active_sinkpad != active_sinkpad && pad == active_sinkpad) {
if (prev_active_sinkpad != active_sinkpad) {
if (prev_active_sinkpad)
g_object_notify (G_OBJECT (prev_active_sinkpad), "active");
g_object_notify (G_OBJECT (active_sinkpad), "active");
......@@ -1050,7 +1050,7 @@ gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
GST_INPUT_SELECTOR_UNLOCK (sel);
if (prev_active_sinkpad != active_sinkpad && pad == active_sinkpad) {
if (prev_active_sinkpad != active_sinkpad) {
if (prev_active_sinkpad)
g_object_notify (G_OBJECT (prev_active_sinkpad), "active");
g_object_notify (G_OBJECT (active_sinkpad), "active");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment