From cc25853399d5f1b3fad5b70731f225743189fd6a Mon Sep 17 00:00:00 2001 From: szcom Date: Tue, 3 May 2022 12:19:17 +0200 Subject: [PATCH] TT#14008 dont look at null packets closes #1487 Change-Id: I1723f3fc0b6b709c10c8a5762ce94a96a2b9d7ff (cherry picked from commit 11098d8f5f4abbdcfbb1f12744d4e0e91467b1e1) --- daemon/codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index c94699164..c87a92f36 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -2783,7 +2783,7 @@ static bool __dtx_drift_shift(struct dtx_buffer *dtxb, struct dtx_packet *dtxp, else if (dtxb->packets.length >= rtpe_config.dtx_buffer) { // inspect TS is most recent packet struct dtx_packet *dtxp_last = g_queue_peek_tail(&dtxb->packets); - ts_diff = dtxp_last->packet->ts - ts; + ts_diff = dtxp_last->packet ? dtxp_last->packet->ts - ts : 0; long long ts_diff_us = (long long) ts_diff * 1000000 / dtxb->clockrate; if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) { // overflow @@ -2819,7 +2819,7 @@ static bool __dtx_drift_drop(struct dtx_buffer *dtxb, struct dtx_packet *dtxp, u else if (dtxb->packets.length >= rtpe_config.dtx_buffer) { // inspect TS is most recent packet struct dtx_packet *dtxp_last = g_queue_peek_tail(&dtxb->packets); - ts_diff = dtxp_last->packet->ts - ts; + ts_diff = dtxp_last->packet ? dtxp_last->packet->ts - ts : 0; long long ts_diff_us = (long long) ts_diff * 1000000 / dtxb->clockrate; if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) { // overflow