[Bug 740949] inputselector: sticky events haven't send out when active track reach EOS.
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Dec 21 19:25:12 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=740949
GStreamer | gstreamer (core) | 1.2.3
--- Comment #23 from kevin <kevinbing.song at gmail.com> 2014-12-22 03:25:04 UTC ---
Below code in function gst_selector_pad_event().
GST_INPUT_SELECTOR_LOCK (sel);
prev_active_sinkpad =
sel->active_sinkpad ? gst_object_ref (sel->active_sinkpad) : NULL;
active_sinkpad = gst_input_selector_activate_sinkpad (sel, pad);
GST_INPUT_SELECTOR_UNLOCK (sel);
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");
g_object_notify (G_OBJECT (sel), "active-pad");
}
if (prev_active_sinkpad)
gst_object_unref (prev_active_sinkpad);
GST_INPUT_SELECTOR_LOCK (sel);
/* only forward if we are dealing with the active sinkpad */
forward = (pad == active_sinkpad);
I want get active_sinkpad again before decide forward. So active pad EOS must
forward as function gst_input_selector_set_active_pad() is also called after
locked.
So below code is useless as if active_selpad->eos is true,
active_selpad->eos_sent must be true. And active_selpad->eos_sent = TRUE isn't
reasonable.
GstSelectorPad *active_selpad;
/* If the active sinkpad is in EOS state but EOS
* was not sent downstream this means that the pad
* got EOS before it was set as active pad and that
* the previously active pad got EOS after it was
* active
*/
active_selpad = GST_SELECTOR_PAD (active_sinkpad);
forward = (active_selpad->eos && !active_selpad->eos_sent);
active_selpad->eos_sent = TRUE;
And will add self->eos to indicate selector into EOS state and don't wait and
discard all received buffer.
Is it ok? If OK, will submit patch later.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list