mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
rtpsession: sanity check RTT before ignoring PLI/FIR
This commit is contained in:
parent
85a56f8ee3
commit
61bc228a71
1 changed files with 5 additions and 0 deletions
|
@ -2575,6 +2575,11 @@ rtp_session_request_local_key_unit (RTPSession * sess, RTPSource * src,
|
||||||
GstClockTime round_trip_in_ns = gst_util_uint64_scale (round_trip,
|
GstClockTime round_trip_in_ns = gst_util_uint64_scale (round_trip,
|
||||||
GST_SECOND, 65536);
|
GST_SECOND, 65536);
|
||||||
|
|
||||||
|
/* Sanity check to avoid always ignoring PLI/FIR if we receive RTCP
|
||||||
|
* packets with erroneous values resulting in crazy high RTT. */
|
||||||
|
if (round_trip_in_ns > 5 * GST_SECOND)
|
||||||
|
round_trip_in_ns = GST_SECOND / 2;
|
||||||
|
|
||||||
if (current_time - sess->last_keyframe_request < 2 * round_trip_in_ns) {
|
if (current_time - sess->last_keyframe_request < 2 * round_trip_in_ns) {
|
||||||
GST_DEBUG ("Ignoring %s request because one was send without one "
|
GST_DEBUG ("Ignoring %s request because one was send without one "
|
||||||
"RTT (%" GST_TIME_FORMAT " < %" GST_TIME_FORMAT ")",
|
"RTT (%" GST_TIME_FORMAT " < %" GST_TIME_FORMAT ")",
|
||||||
|
|
Loading…
Reference in a new issue