[Bug 752213] tee: Avoid race condition while forwarding sticky events

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Apr 13 12:19:09 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=752213

--- Comment #45 from Miguel París Díaz <mparisdiaz at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #44)
> Not sure why you need a recursive mutex here, or any mutex at all. Why
> doesn't any of the existing solutions work if you just forward the sticky
> events that are currently there in request_new_pad() before the pad is
> added... and forward all pending sticky events on the next serialized
> event/buffer?

Because the race condition that I told you in my previous comment #43 causes
the situation you told me in the comment #40

> > By *not* copying the sticky events here, the tee srcpad is not going to have
> > any caps/segment/etc anymore. This might break some application assumptions.

> > Yes, because the pad won't have caps immediately when requesting a pad. But
> > only after some random time.

These both things can happen if the race condition takes place.

Refs
[1] https://bugzilla.gnome.org/show_bug.cgi?id=752213#c43
[2] https://bugzilla.gnome.org/show_bug.cgi?id=752213#c40

-- 
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