Skip to content

Commit 5b4df60

Browse files
committed
MT#55283 add stub handler check for DTX
If the last used PT was a different one, check if it was an unknown PT. If it was, then DTX can remain active, as the packet would have been blocked. Change-Id: Icc8bf195c30a2252b392bbccfeef34b91078ddd6
1 parent bf841c5 commit 5b4df60

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

daemon/codec.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3839,6 +3839,16 @@ static void __dtx_send_later(struct codec_timer *ct) {
38393839
if (pt && pt->codec_def && pt->codec_def->supplemental)
38403840
continue;
38413841

3842+
if (mp_copy.sink.sink) {
3843+
// finally, if the recent PT is not actually known, then the packets
3844+
// were actually blocked, so the codec hasn't changed and DTX usage
3845+
// is still valid
3846+
__auto_type h = codec_handler_get(mp_copy.media, last_pt,
3847+
mp_copy.sink.sink->media, &mp_copy.sink);
3848+
if (h == &codec_handler_stub_ssrc)
3849+
continue;
3850+
}
3851+
38423852
// all other cases: codec change
38433853
break;
38443854
}

0 commit comments

Comments
 (0)