rtpmanager: fix pad callbacks so they handle when parent goes away
authorOle André Vadla Ravnås <oravnas@cisco.com>
Thu, 6 Jan 2011 17:24:36 +0000 (18:24 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 8 Apr 2011 13:16:56 +0000 (15:16 +0200)
commit046f170d6a510e1655aef2385f4425927de7d797
tree6fdabca003f1d67438d065974067f4b2c72449be
parentf8370bb2a898eccb10e8771d9ab4c09be35d2db1
rtpmanager: fix pad callbacks so they handle when parent goes away

1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
gst/rtpmanager/gstrtpjitterbuffer.c
gst/rtpmanager/gstrtpptdemux.c
gst/rtpmanager/gstrtpsession.c
gst/rtpmanager/gstrtpssrcdemux.c