Main: use port +2 for -P <vid_rx>:<vid_tx> syntax

Previously, default ports were used in this case which seem to be less
intuitive.
This commit is contained in:
Martin Pulec
2016-06-13 15:24:12 +02:00
parent 226a69de10
commit ccfd220aeb

View File

@@ -950,7 +950,7 @@ int main(int argc, char *argv[])
if (video_tx_port == -1) {
if ((video_rxtx_mode & MODE_SENDER) == 0) {
video_tx_port = 0;
video_tx_port = 0; // does not matter, we are receiver
} else {
video_tx_port = port_base;
}
@@ -962,7 +962,7 @@ int main(int argc, char *argv[])
// our receiver, because RTCP ports are changed as well)
audio_rx_port = 0;
} else {
audio_rx_port = port_base + 2;
audio_rx_port = video_rx_port ? video_rx_port + 2 : port_base + 2;
}
}
@@ -970,7 +970,7 @@ int main(int argc, char *argv[])
if ((audio_rxtx_mode & MODE_SENDER) == 0) {
audio_tx_port = 0;
} else {
audio_tx_port = port_base + 2;
audio_tx_port = video_tx_port ? video_tx_port + 2 : port_base + 2;
}
}