Browse Source

Merge pull request #6995 from mavlink/defaultRTSPPort

If using RTSP and no port is defined, make sure to set default.
QGC4.4
Gus Grubba 7 years ago committed by GitHub
parent
commit
9f51ed8382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/VideoStreaming/VideoReceiver.cc

4
src/VideoStreaming/VideoReceiver.cc

@ -189,6 +189,10 @@ VideoReceiver::_timeout()
// attempting a connection on this timer. Once a connection is // attempting a connection on this timer. Once a connection is
// found to be working, only then we actually start the stream. // found to be working, only then we actually start the stream.
QUrl url(_uri); QUrl url(_uri);
//-- If RTSP and no port is defined, set default RTSP port (554)
if(_uri.contains("rtsp://") && url.port() <= 0) {
url.setPort(554);
}
_socket = new QTcpSocket; _socket = new QTcpSocket;
QNetworkProxy tempProxy; QNetworkProxy tempProxy;
tempProxy.setType(QNetworkProxy::DefaultProxy); tempProxy.setType(QNetworkProxy::DefaultProxy);

Loading…
Cancel
Save