From ce1aae530dba269b2f7a1a28c8d542bb37bc261f Mon Sep 17 00:00:00 2001 From: Andrew Voznytsa Date: Sat, 11 Apr 2020 20:04:06 +0300 Subject: [PATCH] Workaround crash during app exit (we need more control over objects life time --- src/VideoManager/VideoManager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/VideoManager/VideoManager.cc b/src/VideoManager/VideoManager.cc index 3cd9b04e8..8f2fe4000 100644 --- a/src/VideoManager/VideoManager.cc +++ b/src/VideoManager/VideoManager.cc @@ -71,7 +71,11 @@ VideoManager::~VideoManager() } #if defined(QGC_GST_STREAMING) if (_videoSink[i] != nullptr) { - qgcApp()->toolbox()->corePlugin()->releaseVideoSink(_videoSink[i]); + // FIXME: AV: we need some interaface for video sink with .release() call + // Currently VideoManager is destroyed after corePlugin() and we are crashing on app exit + // calling qgcApp()->toolbox()->corePlugin()->releaseVideoSink(_videoSink[i]); + // As for now let's call GStreamer::releaseVideoSink() directly + GStreamer::releaseVideoSink(_videoSink[i]); _videoSink[i] = nullptr; } #endif -- 2.22.0