diff --git a/src/gsttools/qgstreamervideorenderer.cpp b/src/gsttools/qgstreamervideorenderer.cpp index 4bc92a18c6642f32786b013c792addf4eb4101df..5b0b0d7dd9db16ee35ff4a65f3bc4469cc64ffdc 100644 --- a/src/gsttools/qgstreamervideorenderer.cpp +++ b/src/gsttools/qgstreamervideorenderer.cpp @@ -90,7 +90,7 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface) m_videoSink = 0; if (m_surface) { - disconnect(m_surface, SIGNAL(supportedFormatsChanged()), + disconnect(m_surface.data(), SIGNAL(supportedFormatsChanged()), this, SLOT(handleFormatChange())); } @@ -99,7 +99,7 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface) m_surface = surface; if (m_surface) { - connect(m_surface, SIGNAL(supportedFormatsChanged()), + connect(m_surface.data(), SIGNAL(supportedFormatsChanged()), this, SLOT(handleFormatChange())); } diff --git a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h index b7121e0b524fab6fbb69bb1cd3ae2ecef8347e29..42ce913ece6578294c1caef35707e2d4c01d853c 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h @@ -44,6 +44,7 @@ #include <qvideorenderercontrol.h> #include <private/qvideosurfacegstsink_p.h> +#include <qabstractvideosurface.h> #include "qgstreamervideorendererinterface_p.h" @@ -74,7 +75,7 @@ private slots: private: QVideoSurfaceGstSink *m_videoSink; - QAbstractVideoSurface *m_surface; + QPointer<QAbstractVideoSurface> m_surface; }; QT_END_NAMESPACE