History

avformat/whip: use av_dict_set_int for int

Timo Rothenpieler committed 1 year ago

Commit 8f3ecc91 parent cdc03241 file · +3 −6Browse files

Unified · Split

libavformat/whip.c+3−6
@@ -1221,7 +1221,6 @@ static int ice_dtls_handshake(AVFormatContext *s) · 1220 unmodified lines
1221 int64_t starttime = av_gettime(), now;1221 int64_t starttime = av_gettime(), now;
1222 WHIPContext *whip = s->priv_data;1222 WHIPContext *whip = s->priv_data;
1223 AVDictionary *opts = NULL;1223 AVDictionary *opts = NULL;
1224 char str[8];
1225 char buf[256], *cert_buf = NULL, *key_buf = NULL;1224 char buf[256], *cert_buf = NULL, *key_buf = NULL;
1226 1225
1227 if (whip->state < WHIP_STATE_UDP_CONNECTED || !whip->udp) {1226 if (whip->state < WHIP_STATE_UDP_CONNECTED || !whip->udp) {
@@ -1288,8 +1287,7 @@ next_packet: · 60 unmodified lines
1288 whip->ice_ufrag_remote, whip->ice_ufrag_local, ret, ELAPSED(whip->whip_starttime, av_gettime()));1287 whip->ice_ufrag_remote, whip->ice_ufrag_local, ret, ELAPSED(whip->whip_starttime, av_gettime()));
1289 1288
1290 ff_url_join(buf, sizeof(buf), "dtls", NULL, whip->ice_host, whip->ice_port, NULL);1289 ff_url_join(buf, sizeof(buf), "dtls", NULL, whip->ice_host, whip->ice_port, NULL);
1291 snprintf(str, sizeof(str), "%d", whip->pkt_size);1290 av_dict_set_int(&opts, "mtu", whip->pkt_size, 0);
1292 av_dict_set(&opts, "mtu", str, 0);
1293 if (whip->cert_file) {1291 if (whip->cert_file) {
1294 av_dict_set(&opts, "cert_file", whip->cert_file, 0);1292 av_dict_set(&opts, "cert_file", whip->cert_file, 0);
1295 } else1293 } else
@@ -1299,10 +1297,9 @@ next_packet: · 3 unmodified lines
1299 av_dict_set(&opts, "key_file", whip->key_file, 0);1297 av_dict_set(&opts, "key_file", whip->key_file, 0);
1300 } else1298 } else
1301 av_dict_set(&opts, "key_buf", whip->key_buf, 0);1299 av_dict_set(&opts, "key_buf", whip->key_buf, 0);
1302
1303 av_dict_set(&opts, "fingerprint", whip->dtls_fingerprint, 0);1300 av_dict_set(&opts, "fingerprint", whip->dtls_fingerprint, 0);
1304 av_dict_set(&opts, "use_external_udp", "1", 0);1301 av_dict_set_int(&opts, "use_external_udp", 1, 0);
1305 av_dict_set(&opts, "listen", "1", 0);1302 av_dict_set_int(&opts, "listen", 1, 0);
1306 /* If got the first binding response, start DTLS handshake. */1303 /* If got the first binding response, start DTLS handshake. */
1307 ret = ffurl_open_whitelist(&whip->dtls_uc, buf, AVIO_FLAG_READ_WRITE, &s->interrupt_callback,1304 ret = ffurl_open_whitelist(&whip->dtls_uc, buf, AVIO_FLAG_READ_WRITE, &s->interrupt_callback,
1308 &opts, s->protocol_whitelist, s->protocol_blacklist, NULL);1305 &opts, s->protocol_whitelist, s->protocol_blacklist, NULL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t