From cd4b4991313c9442fd9c3e9b279c88fe94143ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Fran=C4=8De=C5=A1kin?= Date: Thu, 27 Dec 2018 13:02:42 +0100 Subject: [PATCH] Restart video when stream ends to recover from loss of communication. --- src/VideoStreaming/VideoReceiver.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index 148e07113..5f04a75ce 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -535,7 +535,8 @@ VideoReceiver::_shutdownPipeline() { void VideoReceiver::_handleError() { qCDebug(VideoReceiverLog) << "Gstreamer error!"; - _shutdownPipeline(); + stop(); + start(); } #endif @@ -550,7 +551,8 @@ VideoReceiver::_handleEOS() { _shutdownRecordingBranch(); } else { qWarning() << "VideoReceiver: Unexpected EOS!"; - _shutdownPipeline(); + stop(); + start(); } } #endif -- 2.22.0