From 88c34e7b3ff9142065722fdebfa21420eed73995 Mon Sep 17 00:00:00 2001 From: "Byron Campen [:bwc]" Date: Fri, 12 Jul 2019 21:36:16 +0000 Subject: [PATCH] Bug 1559512: Make sure that we grab the first RTP packet when checking RTP extensions, because the mid extension is only used in the first several. r=jib Differential Revision: https://phabricator.services.mozilla.com/D37884 --HG-- extra : moz-landing-system : lando --- ...eerConnection_basicAudioVerifyRtpHeaderExtensions.html | 8 +++++--- ...eerConnection_basicVideoVerifyRtpHeaderExtensions.html | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dom/media/tests/mochitest/test_peerConnection_basicAudioVerifyRtpHeaderExtensions.html b/dom/media/tests/mochitest/test_peerConnection_basicAudioVerifyRtpHeaderExtensions.html index 56b17fd8d311..d5c28eedf3a1 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVerifyRtpHeaderExtensions.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVerifyRtpHeaderExtensions.html @@ -33,14 +33,16 @@ ); } + const pc = SpecialPowers.wrap(test.pcRemote._pc); + const haveFirstPacket = getRtpPacket(pc); + test.chain.insertBefore('PC_REMOTE_WAIT_FOR_MEDIA_FLOW', [ async function PC_REMOTE_CHECK_RTP_HEADER_EXTS_AGAINST_SDP() { const sdpExtmapIds = sdputils.findExtmapIds(test.originalAnswer.sdp); - let pc = SpecialPowers.wrap(test.pcRemote._pc); - let [level, type, sending, data] = await getRtpPacket(pc); - let extensions = ParseRtpPacket(data).header.extensions; + const [level, type, sending, data] = await haveFirstPacket; + const extensions = ParseRtpPacket(data).header.extensions; // make sure we got the same number of rtp header extensions in // the received packet as were negotiated in the sdp. Then diff --git a/dom/media/tests/mochitest/test_peerConnection_basicVideoVerifyRtpHeaderExtensions.html b/dom/media/tests/mochitest/test_peerConnection_basicVideoVerifyRtpHeaderExtensions.html index 1c87e4dd87bc..503f85ad2080 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicVideoVerifyRtpHeaderExtensions.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicVideoVerifyRtpHeaderExtensions.html @@ -31,13 +31,15 @@ ); } + const pc = SpecialPowers.wrap(test.pcRemote._pc); + const haveFirstPacket = getRtpPacket(pc); + test.chain.insertBefore('PC_REMOTE_WAIT_FOR_MEDIA_FLOW', [ async function PC_REMOTE_CHECK_RTP_HEADER_EXTS_AGAINST_SDP() { const sdpExtmapIds = sdputils.findExtmapIds(test.originalAnswer.sdp); - const pc = SpecialPowers.wrap(test.pcRemote._pc); - const [level, type, sending, data] = await getRtpPacket(pc); + const [level, type, sending, data] = await haveFirstPacket; const packet = ParseRtpPacket(data); const extIds = packet.header.extensions.map(e => `${e.id}`); // make sure we got the same number of rtp header extensions in