GNOME Bugzilla – Bug 649617
[rtp] Deadlock and other fixes for rtpssrcdemux
Last modified: 2011-06-15 22:43:37 UTC
Here are some patches to fix some problems with rtpssrcdemux: 1. It emits signals with its lock held (causing deadlocks when used with the re-negotiate event patches) 2. There is no pad iterate for its sink pads Also there is another potential problem for which I have no solution, I'm afraid there is a potential race if the "clear-ssrc" action signal is called while a chain function is being called.. It could free the "dpad" struct while it is being used by the chain functions. Refcounting the dpad struct would fix that.. But then you get into the problem of what happens if you are unlucky enough to try to re-add the src pad while it is being removed.. Like remove it from the list, release the lock, try to re-add it (but before the src pads have been removed from the object), it gets nasty...
Created attachment 187398 [details] [review] rtpssrcdemux: Release lock before emitting signal If the lock is not released before emitting a signal, it may cause a deadlock if any other function in the element is called. Also removed an unused timestamp parameter
Created attachment 187399 [details] [review] rtpssrcdemux: iterate pad function is only valid for src pads The iterate function is only used for src pads, so mark it as such and remove dead code.
Created attachment 187400 [details] [review] ssrcdemux: Implement iterate internal links for sink pads
Comment on attachment 187399 [details] [review] rtpssrcdemux: iterate pad function is only valid for src pads The iterate internal links function for the sink pads is correct as is? Currently it would return all srcpads but I think instead it should return only the rtp src for the rtp sink and the rtcp src for the rtp sink
Comment on attachment 187400 [details] [review] ssrcdemux: Implement iterate internal links for sink pads Oh nevermind, I should've looked at the next patch first :)
commit b6bfc512e8c3781b272732b9b342a225bb32412a Author: Olivier Crête <olivier.crete@collabora.co.uk> Date: Fri May 6 19:09:17 2011 -0400 ssrcdemux: Implement iterate internal links for sink pads https://bugzilla.gnome.org/show_bug.cgi?id=649617 commit 23b6c8febc71b3303ae6bca19ae9ef9a7f2ca1e8 Author: Olivier Crête <olivier.crete@collabora.co.uk> Date: Fri May 6 18:41:01 2011 -0400 rtpssrcdemux: iterate pad function is only valid for src pads The iterate function is only used for src pads, so mark it as such and remov dead code. https://bugzilla.gnome.org/show_bug.cgi?id=649617 commit 1bf94a92b04e4b0ff83fd015daa46e880cc4d920 Author: Olivier Crête <olivier.crete@collabora.co.uk> Date: Fri May 6 18:12:53 2011 -0400 rtpssrcdemux: Release lock before emitting signal If the lock is not released before emitting a signal, it may cause a deadloc if any other function in the element is called. Also removed an unused timestamp parameter https://bugzilla.gnome.org/show_bug.cgi?id=649617