diff --git a/daemon/codec.c b/daemon/codec.c index 331a5fbaf..eee4b7635 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -2652,6 +2652,7 @@ static void __dtx_send_later(struct timerthread_queue *ttq, void *p) { } int ptime = dtxb->ptime; + time_t dtxb_start = dtxb->start; mutex_unlock(&dtxb->lock); @@ -2673,7 +2674,7 @@ static void __dtx_send_later(struct timerthread_queue *ttq, void *p) { "Decoder error while processing buffered RTP packet"); } else { - unsigned int diff = rtpe_now.tv_sec - dtxb->start; + int diff = rtpe_now.tv_sec - dtxb_start; if (rtpe_config.max_dtx <= 0 || diff < rtpe_config.max_dtx) { ilogs(dtx, LOG_DEBUG, "RTP media for TS %lu missing, triggering DTX", ts);