rtpsession: Fix on-feedback-rtcp race
authorMikhail Fludkov <misha@pexip.com>
Fri, 25 Aug 2017 09:59:00 +0000 (11:59 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 13 May 2018 19:33:56 +0000 (20:33 +0100)
commit386ca1d378ea088b46ab51872bccb877f38d12e0
treed354207d05ed45c5a5c639cd619cf388a83bcefe
parent29f26e87689baa8f86865dca0f4259c975add96e
rtpsession: Fix on-feedback-rtcp race

If there is an external source which is about to timeout and be removed
from the source hashtable and we receive feedback RTCP packet with the
media ssrc of the source, we unlock the session in
rtp_session_process_feedback before emitting 'on-feedback-rtcp' signal
allowing rtcp timer to kick in and grab the lock. It will get rid of
the source and rtp_session_process_feedback will be left with RTPSource
with ref count 0.

The fix is to grab the ref to the RTPSource object in
rtp_session_process_feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
gst/rtpmanager/rtpsession.c
tests/check/elements/rtpsession.c