mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 04:40:16 +00:00
main.cpp: even if not sending use non-zero ports
The send/recv port equality is then used to determine if it is safe to use Jumbo frames over localhost.
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1284,11 +1284,7 @@ static int adjust_params(struct ug_options *opt) {
|
||||
}
|
||||
|
||||
if (opt->video_tx_port == -1) {
|
||||
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;
|
||||
}
|
||||
opt->video_tx_port = opt->port_base;
|
||||
}
|
||||
|
||||
if (opt->audio.recv_port == -1) {
|
||||
@@ -1302,11 +1298,7 @@ static int adjust_params(struct ug_options *opt) {
|
||||
}
|
||||
|
||||
if (opt->audio.send_port == -1) {
|
||||
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;
|
||||
}
|
||||
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