===========================================================================
 CASE 1 - RTCP thread exits after checking invalid interval
===========================================================================

0:00:00.878088000 13136   156f3910 WARN              rtpsession gstrtpsession.c:837:rtcp_thread:<rtpsession0> [12804] entering RTCP thread
0:00:00.878088000 13136   156f3910 DEBUG             rtpsession gstrtpsession.c:847:rtcp_thread:<rtpsession0> starting at 0:00:00.015354526
0:00:00.878088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2746:rtp_session_next_timeout: [12804] current time: 0:00:00.015354526, next time: 0:00:00.000000000
0:00:00.878088000 13136   156f3910 DEBUG             rtpsession gstrtpsession.c:857:rtcp_thread:<rtpsession0> next check time 0:00:00.000000000
0:00:00.878088000 13136   156f3910 WARN              rtpsession gstrtpsession.c:793:get_current_times:<rtpsession0> [12804] into RTCP thread
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession gstrtpsession.c:891:rtcp_thread:<rtpsession0> unlocked 1, current 0:00:00.015624819
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:3150:rtp_session_on_timeout: [12804] reporting at 0:00:00.015624819, NTP time 984343:47:54.163986000
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [12804] determ 1, first 1
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2565:calculate_rtcp_interval: [12804] recalc bandwidth
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpstats.c:57:rtp_stats_set_bandwidths: recalc bandwidths: RTP 64000, RTCP 3200.000000, RS 4294967295, RR 0
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpstats.c:117:rtp_stats_set_bandwidths: bandwidths: RTP 64000, RTCP 3200, RS 1.000000, RR 0.000000
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [12804] rtcp interval
0:00:00.879088000 13136   156f3910 WARN              rtpsession rtpstats.c:172:rtp_stats_calculate_rtcp_interval: no bandwidth for RTCP
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 99:99:99.999999999, first 1
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 99:99:99.999999999
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2926:session_cleanup: #total_sources 1, sender_sources 0, active_sources 1
0:00:00.879088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [12804] determ 0, first 0
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [12804] rtcp interval
0:00:00.880088000 13136   156f3910 WARN              rtpsession rtpstats.c:172:rtp_stats_calculate_rtcp_interval: no bandwidth for RTCP
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 99:99:99.999999999, first 0
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 99:99:99.999999999
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:3081:is_rtcp_time: can send RTCP now, next interval 99:99:99.999999999
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2796:session_start_rtcp: create RR for SSRC 79b0bc48
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:3216:rtp_session_on_timeout: Timing out collisions
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:3266:rtp_session_on_timeout: 156E5148, sending RTCP packet, avg size 98, 76
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession gstrtpsession.c:1147:gst_rtp_session_send_rtcp:<rtpsession0> not sending RTCP, no output pad
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2705:rtp_session_next_timeout: [12804] current time: 0:00:00.015624819, next :0:00:00.015624818
0:00:00.880088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2708:rtp_session_next_timeout: take current time as base
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2729:rtp_session_next_timeout: old check time expired, getting new timeout
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [12804] determ 0, first 0
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [12804] rtcp interval
0:00:00.881088000 13136   156f3910 WARN              rtpsession rtpstats.c:172:rtp_stats_calculate_rtcp_interval: no bandwidth for RTCP
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 99:99:99.999999999, first 0
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 99:99:99.999999999
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession rtpsession.c:2746:rtp_session_next_timeout: [12804] current time: 0:00:00.015624819, next time: 99:99:99.999999999
0:00:00.881088000 13136   156f3910 DEBUG             rtpsession gstrtpsession.c:857:rtcp_thread:<rtpsession0> next check time 99:99:99.999999999
0:00:00.881088000 13136   156f3910 WARN              rtpsession gstrtpsession.c:862:rtcp_thread:<rtpsession0> [12804] next_timeout == GST_CLOCK_TIME_NONE, breaking while
0:00:00.882088000 13136   156f3910 WARN              rtpsession gstrtpsession.c:903:rtcp_thread:<rtpsession0> [12804] leaving RTCP thread


===========================================================================
 CASE 2 - RTCP thread doesn't exits and computes spurious intervals
 (log is truncated at first bad value)
===========================================================================

0:02:38.175816000  9176   15f6ce60 WARN              rtpsession gstrtpsession.c:837:rtcp_thread:<rtpsession17> [5352] entering RTCP thread
0:02:38.175816000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:847:rtcp_thread:<rtpsession17> starting at 0:02:37.126430853
0:02:38.175816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2746:rtp_session_next_timeout: [5352] current time: 0:02:37.126430853, next time: 0:00:00.000000000
0:02:38.175816000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:857:rtcp_thread:<rtpsession17> next check time 0:00:00.000000000
0:02:38.175816000  9176   15f6ce60 WARN              rtpsession gstrtpsession.c:793:get_current_times:<rtpsession17> [5352] into RTCP thread
0:02:38.175816000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:891:rtcp_thread:<rtpsession17> unlocked 1, current 0:02:37.126684466
0:02:38.175816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3154:rtp_session_on_timeout: [5352] reporting at 0:02:37.126684466, NTP time 984344:54:24.875017000
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [5352] determ 1, first 1
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2565:calculate_rtcp_interval: [5352] recalc bandwidth
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:57:rtp_stats_set_bandwidths: recalc bandwidths: RTP 64000, RTCP 3200.000000, RS 4294967295, RR 4294967295
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:117:rtp_stats_set_bandwidths: bandwidths: RTP 64000, RTCP 3200, RS 0.250000, RR 0.750000
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [5352] rtcp interval
0:02:38.176816000  9176   15f6ce60 WARN              rtpsession rtpstats.c:185:rtp_stats_calculate_rtcp_interval: avg size 100.000000, n 1.000000, rtcp_bw 2400.000000
0:02:38.176816000  9176   15f6ce60 WARN              rtpsession rtpstats.c:189:rtp_stats_calculate_rtcp_interval: interval < rtcp_min_time, adjusting to 2500000000.000000
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 0:00:02.500000000, first 1
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 0:00:02.500000000
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2926:session_cleanup: #total_sources 1, sender_sources 0, active_sources 1
0:02:38.176816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3047:is_rtcp_time: data interval 0:00:02.500000000 , current_time 0:02:37.126684466
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [5352] determ 0, first 0
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [5352] rtcp interval
0:02:38.177816000  9176   15f6ce60 WARN              rtpsession rtpstats.c:185:rtp_stats_calculate_rtcp_interval: avg size 100.000000, n 1.000000, rtcp_bw 2400.000000
0:02:38.177816000  9176   15f6ce60 WARN              rtpsession rtpstats.c:189:rtp_stats_calculate_rtcp_interval: interval < rtcp_min_time, adjusting to 5000000000.000000
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 0:00:05.000000000, first 0
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:219:rtp_stats_add_rtcp_jitter: RTCP jitter 0:00:04.041053162, interval 0:00:05.000000000
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 0:00:04.041053162
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3085:is_rtcp_time: can send RTCP now, next interval 0:00:04.041053162
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2796:session_start_rtcp: create RR for SSRC 6d7ac153
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3220:rtp_session_on_timeout: Timing out collisions
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3270:rtp_session_on_timeout: 15A2A610, sending RTCP packet, avg size 98, 76
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:1147:gst_rtp_session_send_rtcp:<rtpsession17> not sending RTCP, no output pad
0:02:38.177816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2705:rtp_session_next_timeout: [5352] current time: 0:02:37.126684466, next :0:02:41.167737628
0:02:38.178816000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2746:rtp_session_next_timeout: [5352] current time: 0:02:37.126684466, next time: 0:02:41.167737628
0:02:38.178816000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:857:rtcp_thread:<rtpsession17> next check time 0:02:41.167737628
0:02:38.178816000  9176   15f6cd70 DEBUG             rtpsession gstrtpsession.c:2108:gst_rtp_session_request_new_pad:<rtpsession17> requesting pad recv_rtcp_sink
0:02:38.178816000  9176   15f6cd70 DEBUG             rtpsession gstrtpsession.c:1956:create_recv_rtcp_sink:<rtpsession17> creating RTCP sink pad
0:02:38.178816000  9176   15f6cd70 DEBUG             rtpsession gstrtpsession.c:1971:create_recv_rtcp_sink:<rtpsession17> creating sync src pad
0:02:38.178816000  9176   15f6cd70 WARN                 rtspsrc gstrtspsrc.c:2768:gst_rtspsrc_stream_configure_mcast:<rtsp-source> Setting udp_buffer_size 524288 ONLY for RTP
0:02:38.179816000  9176   15f6cd70 WARN                 rtspsrc gstrtspsrc.c:2903:gst_rtspsrc_stream_configure_udp_sinks:<rtsp-source> configure RTP UDP sink for 231.0.0.53:61166
0:02:38.351834000  9176   15a1b588 DEBUG             rtpsession gstrtpsession.c:1356:gst_rtp_session_event_recv_rtp_sink:<rtpsession17> received event newsegment
0:02:38.351834000  9176   15a1b588 DEBUG             rtpsession gstrtpsession.c:1386:gst_rtp_session_event_recv_rtp_sink:<rtpsession17> configured NEWSEGMENT update 0, rate 1.000000, applied rate 1.000000, format GST_FORMAT_TIME, 0:00:00.000000000 -- 99:99:99.999999999, time 0:00:00.000000000, accum 0:00:00.000000000
0:02:38.351834000  9176   15a1b588 DEBUG             rtpsession gstrtpsession.c:1225:gst_rtp_session_cache_caps:<rtpsession17> parsing caps
0:02:38.351834000  9176   15a1b588 DEBUG             rtpsession gstrtpsession.c:1313:gst_rtp_session_clock_rate:<rtpsession17> parsed clock-rate 1000
0:02:38.352834000  9176   15a1b588 DEBUG             rtpsession rtpsession.c:1256:source_clock_rate: got clock-rate 1000 for pt 96
0:02:38.353834000  9176   15a1b588 DEBUG             rtpsession rtpsession.c:1809:rtp_session_process_rtp: source: 0000167e became active, 2 active sources
0:02:38.353834000  9176   15a1b588 DEBUG             rtpsession rtpsession.c:1815:rtp_session_process_rtp: source: 0000167e became sender, 1 sender sources
0:02:38.552854000  9176   15a38d48 INFO            gstcliplayer PipelineHandler.cpp:425:GstCLILibrary::new_src_pad_cb:  Source (rtsp) pad caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)1000, encoding-name=(string)MP4V-ES, profile-level-id=(string)245, config=(string)000001B0F5000001B509000001000000012000C48DC0004C35405F7003F79490019A2C08902887000001B2656D347620342E332E302E3000C3FF, a-framerate=(string)25, x-dimensions=(string)"704\,576", x-algoTarget=(string)P, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
0:02:38.552854000  9176   15a38d48 INFO            gstcliplayer PipelineHandler.cpp:474:GstCLILibrary::new_src_pad_cb: player link rtsp-queue returned 0
0:02:38.553854000  9176   15a38d48 INFO            gstcliplayer PipelineHandler.cpp:477:GstCLILibrary::new_src_pad_cb: player link queue-decoder returned 1
0:02:38.561855000  9176   15f6cec0 WARN            rtpmp4vdepay gstrtpmp4vdepay.c:185:gst_rtp_mp4v_depay_process: discont
0:02:38.563855000  9176   15f6cec0 INFO            gstcliplayer PipelineHandler.cpp:355:GstCLILibrary::new_dec_pad_cb:  Source (decoder) pad caps = video/x-raw-rgb; video/x-raw-yuv
0:02:38.564855000  9176   15f6cec0 INFO            gstcliplayer PipelineHandler.cpp:392:GstCLILibrary::new_dec_pad_cb: link decoder-video returned 0
0:02:42.217220000  9176   15f6ce60 WARN              rtpsession gstrtpsession.c:793:get_current_times:<rtpsession17> [5352] into RTCP thread
0:02:42.217220000  9176   15f6ce60 DEBUG             rtpsession gstrtpsession.c:891:rtcp_thread:<rtpsession17> unlocked 0, current 0:02:41.167744203
0:02:42.217220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3154:rtp_session_on_timeout: [5352] reporting at 0:02:41.167744203, NTP time 984344:54:28.916421000
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2559:calculate_rtcp_interval: [5352] determ 1, first 0
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2565:calculate_rtcp_interval: [5352] recalc bandwidth
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:57:rtp_stats_set_bandwidths: recalc bandwidths: RTP 64000, RTCP 3200.000000, RS 4294967295, RR 0
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:117:rtp_stats_set_bandwidths: bandwidths: RTP 64000, RTCP 3200, RS 1.000000, RR 0.000000
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2589:calculate_rtcp_interval: [5352] rtcp interval
0:02:42.218220000  9176   15f6ce60 WARN              rtpsession rtpstats.c:172:rtp_stats_calculate_rtcp_interval: no bandwidth for RTCP
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2595:calculate_rtcp_interval: next deterministic interval: 99:99:99.999999999, first 0
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2600:calculate_rtcp_interval: next interval: 99:99:99.999999999
0:02:42.218220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2926:session_cleanup: #total_sources 2, sender_sources 1, active_sources 2
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2926:session_cleanup: #total_sources 2, sender_sources 1, active_sources 2
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3047:is_rtcp_time: data interval 99:99:99.999999999 , current_time 0:02:41.167744203
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpstats.c:219:rtp_stats_add_rtcp_jitter: RTCP jitter 5075823:38:49.220245504, interval 99:99:99.999999999
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3067:is_rtcp_time: forward reconsideration 5075823:38:49.220245504, elapsed 0:02:41.167744203
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3074:is_rtcp_time: reconsider RTCP for 5075823:38:49.220245504
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:3220:rtp_session_on_timeout: Timing out collisions
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2705:rtp_session_next_timeout: [5352] current time: 0:02:41.167744203, next :5075823:38:49.220245504
0:02:42.219220000  9176   15f6ce60 DEBUG             rtpsession rtpsession.c:2746:rtp_session_next_timeout: [5352] current time: 0:02:41.167744203, next time: 5075823:38:49.220245504

