[Bug 732750] videoaggregator: broken locking in setcaps function

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jul 6 14:37:49 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=732750
  GStreamer | gst-plugins-bad | git

Thibault Saunier <tsaunier> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #4 from Thibault Saunier <tsaunier at gnome.org> 2014-07-06 21:37:44 UTC ---
(In reply to comment #0)
> I don't really understand how the locking is supposed to work there - at least
> four different locks at the same time! Respect! (PAD_STREAM_LOCK,
> AGGREGATOR_SETCAPS_LOCK, AGGREGATOR_LOCK, OBJECT_LOCK)
> 
> All I can say is that it's buggy:
> 
> Line 558 does GST_OBJECT_UNLOCK (vagg); and then line 613 and 633 call
> GST_OBJECT_UNLOCK again.

Not sure why you talk about the pad stream lock.

Then the locking logic is the exact same one as with videomixer, at that time
we need the src cpas lock avoid concurrent srcpad caps negotiation, then we
need to avoid the aggregate function to be called at that same time. And we
need the object lock to iterate the sinkpads, I agree it can look weird but I
think it is correct. I attach here a patch that should be more correct as the
object lock should be taken only for the iteration part.

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