From ff1eb2d3a5e8b12b8301fecefe94e77a554b93ff Mon Sep 17 00:00:00 2001 From: Andrew Voznytsa Date: Sat, 11 Apr 2020 20:38:48 +0300 Subject: [PATCH] Fix timeout handling --- src/VideoManager/VideoManager.cc | 4 ++-- src/VideoReceiver/GstVideoReceiver.cc | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/VideoManager/VideoManager.cc b/src/VideoManager/VideoManager.cc index 8f2fe4000..fc176a8c7 100644 --- a/src/VideoManager/VideoManager.cc +++ b/src/VideoManager/VideoManager.cc @@ -116,7 +116,7 @@ VideoManager::setToolbox(QGCToolbox *toolbox) _videoReceiver[1] = toolbox->corePlugin()->createVideoReceiver(this); connect(_videoReceiver[0], &VideoReceiver::timeout, this, [this](){ - _restartVideo(0); + _stopReceiver(0); }); connect(_videoReceiver[0], &VideoReceiver::streamingChanged, this, [this](bool active){ @@ -179,7 +179,7 @@ VideoManager::setToolbox(QGCToolbox *toolbox) // and I expect that it will be changed during multiple video stream activity if (_videoReceiver[1] != nullptr) { connect(_videoReceiver[1], &VideoReceiver::timeout, this, [this](){ - _restartVideo(1); + _stopReceiver(1); }); connect(_videoReceiver[1], &VideoReceiver::streamingChanged, this, [this](bool active){ diff --git a/src/VideoReceiver/GstVideoReceiver.cc b/src/VideoReceiver/GstVideoReceiver.cc index 2dfb78e16..5f4fed69a 100644 --- a/src/VideoReceiver/GstVideoReceiver.cc +++ b/src/VideoReceiver/GstVideoReceiver.cc @@ -356,9 +356,6 @@ GstVideoReceiver::stop(void) }); } else { qCDebug(VideoReceiverLog) << "Streaming did not start" << _uri; - _dispatchSignal([this](){ - emit timeout(); - }); } } -- 2.22.0