rtpjitterbuffer: fix crash when do-retransmission=true and a lot of buffers are lost

The problem here was that the jitterbuffer lock was unlocked to push
the event, but that caused another thread to remove the timer currently
being processed, probably because the amount of rtx events
(and therefore timers) was getting too high. The solution is to
unlock and push the event only after timer processing has finished.

fixes https://bugzilla.gnome.org/show_bug.cgi?id=711131
This commit is contained in:
George Kiagiadakis 2013-11-05 10:48:33 +02:00 committed by Wim Taymans
parent b3e0b1dbca
commit b81b2efa3e

View file

@ -2453,9 +2453,6 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
priv->num_rtx_requests++;
timer->num_rtx_retry++;
timer->rtx_last = now;
JBUF_UNLOCK (priv);
gst_pad_push_event (priv->sinkpad, event);
JBUF_LOCK (priv);
/* calculate the timeout for the next retransmission attempt */
timer->rtx_retry += (priv->rtx_retry_timeout * GST_MSECOND);
@ -2476,6 +2473,10 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
reschedule_timer (jitterbuffer, timer, timer->seqnum,
timer->rtx_base + timer->rtx_retry, timer->rtx_delay, FALSE);
JBUF_UNLOCK (priv);
gst_pad_push_event (priv->sinkpad, event);
JBUF_LOCK (priv);
return FALSE;
}