mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 06:04:50 +00:00
Revert "main.cpp: even if not sending use non-zero ports"
This reverts commit c25a362c70.
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1296,7 +1296,11 @@ static int adjust_params(struct ug_options *opt) {
|
||||
}
|
||||
|
||||
if (opt->video_tx_port == -1) {
|
||||
opt->video_tx_port = opt->port_base;
|
||||
if ((opt->video_rxtx_mode & MODE_SENDER) == 0U) {
|
||||
opt->video_tx_port = 0; // does not matter, we are receiver
|
||||
} else {
|
||||
opt->video_tx_port = opt->port_base;
|
||||
}
|
||||
}
|
||||
|
||||
if (opt->audio.recv_port == -1) {
|
||||
@@ -1310,7 +1314,11 @@ static int adjust_params(struct ug_options *opt) {
|
||||
}
|
||||
|
||||
if (opt->audio.send_port == -1) {
|
||||
opt->audio.send_port = opt->video_tx_port ? opt->video_tx_port + 2 : opt->port_base + 2;
|
||||
if ((audio_rxtx_mode & MODE_SENDER) == 0U) {
|
||||
opt->audio.send_port = 0;
|
||||
} else {
|
||||
opt->audio.send_port = opt->video_tx_port ? opt->video_tx_port + 2 : opt->port_base + 2;
|
||||
}
|
||||
}
|
||||
|
||||
// If we are sure that this UltraGrid is sending to itself we can optimize some parameters
|
||||
|
||||
Reference in New Issue
Block a user