Browse Source

Workaround crash during app exit (we need more control over objects life time

QGC4.4
Andrew Voznytsa 5 years ago
parent
commit
ce1aae530d
  1. 6
      src/VideoManager/VideoManager.cc

6
src/VideoManager/VideoManager.cc

@ -71,7 +71,11 @@ VideoManager::~VideoManager() @@ -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

Loading…
Cancel
Save