Browse Source

TT#14008 dont look at null packets

closes #1487

Change-Id: I1723f3fc0b6b709c10c8a5762ce94a96a2b9d7ff
(cherry picked from commit 11098d8f5f)
mr10.3
szcom 4 years ago
committed by Richard Fuchs
parent
commit
cc25853399
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      daemon/codec.c

+ 2
- 2
daemon/codec.c View File

@ -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) { else if (dtxb->packets.length >= rtpe_config.dtx_buffer) {
// inspect TS is most recent packet // inspect TS is most recent packet
struct dtx_packet *dtxp_last = g_queue_peek_tail(&dtxb->packets); 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; long long ts_diff_us = (long long) ts_diff * 1000000 / dtxb->clockrate;
if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) { if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) {
// overflow // 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) { else if (dtxb->packets.length >= rtpe_config.dtx_buffer) {
// inspect TS is most recent packet // inspect TS is most recent packet
struct dtx_packet *dtxp_last = g_queue_peek_tail(&dtxb->packets); 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; long long ts_diff_us = (long long) ts_diff * 1000000 / dtxb->clockrate;
if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) { if (ts_diff_us >= (long long) rtpe_config.dtx_lag * 1000) {
// overflow // overflow


Loading…
Cancel
Save