Skip to content

Commit cd0365f

Browse files
committed
.
1 parent e66b0fb commit cd0365f

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

libavformat/whip.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "network.h"
4343
#include "srtp.h"
4444
#include "tls.h"
45-
#include <errno.h>
4645
/**
4746
* Maximum size limit of a Session Description Protocol (SDP),
4847
* be it an offer or answer.
@@ -162,11 +161,9 @@
162161
/* STUN Attribute, comprehension-required range (0x0000-0x7FFF) */
163162
enum STUNAttr {
164163
STUN_ATTR_USERNAME = 0x0006, /// shared secret response/bind request
165-
STUN_ATTR_PRIORITY = 0x0024, /// ICE controlling/controlled
166164
STUN_ATTR_USE_CANDIDATE = 0x0025, /// bind request
167165
STUN_ATTR_MESSAGE_INTEGRITY = 0x0008, /// bind request/response
168166
STUN_ATTR_FINGERPRINT = 0x8028, /// rfc5389
169-
STUN_ATTR_ICE_CONTROLLING = 0x802A, /// full agent talking to ice-lite
170167
};
171168

172169
enum WHIPState {
@@ -316,10 +313,6 @@ typedef struct WHIPContext {
316313
int consent_interval;
317314
int64_t last_consent_tx;
318315
int consent_failures;
319-
320-
/* ICE-lite support */
321-
int ice_lite_remote;
322-
uint64_t ice_tie_breaker; /* random 64-bit, for ICE-CONTROLLING */
323316
} WHIPContext;
324317

325318
/**
@@ -429,9 +422,6 @@ static av_cold int initialize(AVFormatContext *s)
429422
seed = av_get_random_seed();
430423
av_lfg_init(&whip->rnd, seed);
431424

432-
/* 64-bit tie-breaker for ICE-CONTROLLING (RFC 8445 6.1.1) */
433-
whip->ice_tie_breaker = ((uint64_t)av_lfg_get(&whip->rnd) << 32) | (uint64_t)av_lfg_get(&whip->rnd);
434-
435425
/* Initialise consent-freshness timers */
436426
if (whip->consent_interval <= 0)
437427
whip->consent_interval = WHIP_CONSENT_DEF_INTERVAL;
@@ -920,8 +910,6 @@ static int parse_answer(AVFormatContext *s)
920910
goto end;
921911
}
922912
}
923-
} else if (av_strstart(line, "a=ice-lite", NULL)) {
924-
whip->ice_lite_remote = 1;
925913
}
926914
}
927915

@@ -1013,21 +1001,6 @@ static int ice_create_request(AVFormatContext *s, uint8_t *buf, int buf_size, in
10131001
avio_wb16(pb, STUN_ATTR_USE_CANDIDATE); /* attribute type use-candidate */
10141002
avio_wb16(pb, 0); /* size of use-candidate */
10151003

1016-
/**
1017-
* For ICE-lite peers we are *always* the controlling agent (RFC 8445 6.1.3.1).
1018-
* Add PRIORITY + ICE-CONTROLLING attributes.
1019-
*/
1020-
if (whip->ice_lite_remote) {
1021-
/* we are controlling, use host-candidate priority 126 << 24 | 65535 << 8 | 255 = 2130706431 */
1022-
avio_wb16(pb, STUN_ATTR_PRIORITY);
1023-
avio_wb16(pb, 4);
1024-
avio_wb32(pb, 2130706431);
1025-
1026-
avio_wb16(pb, STUN_ATTR_ICE_CONTROLLING);
1027-
avio_wb16(pb, 8);
1028-
avio_wb32(pb, (uint32_t)(whip->ice_tie_breaker >> 32));
1029-
avio_wb32(pb, (uint32_t)(whip->ice_tie_breaker & 0xffffffff));
1030-
}
10311004

10321005
/* Build and update message integrity */
10331006
avio_wb16(pb, STUN_ATTR_MESSAGE_INTEGRITY); /* attribute type message integrity */

0 commit comments

Comments
 (0)