[Bug 770766] rtpssrcdemux: Fix race condition in clear-ssrc signal handler
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Sep 26 06:40:51 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=770766
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #334666|none |reviewed
status| |
--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 334666:
--> (https://bugzilla.gnome.org/review?bug=770766&attachment=334666)
::: gst/rtpmanager/gstrtpssrcdemux.c
@@ +530,3 @@
+ gst_element_remove_pad (GST_ELEMENT_CAST (demux), dpad->rtp_pad);
+ gst_element_remove_pad (GST_ELEMENT_CAST (demux), dpad->rtcp_pad);
+ GST_PAD_UNLOCK (demux);
The problem here is that remove_pad() will emit the pad-removed signal... which
might cause the application (or other code) from the signal handler to do
something else on ssrcdemux that will take the same mutex again, possibly from
another thread.
Do you see a way of doing this different without keeping this mutex locked?
It's a recursive mutex, so problems are unlikely, it's still problematic
though.
Apart from that, the patch makes sense.
--
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