Reset VideoSurface pointer when deleted

Change-Id: Iec74c8a8b914d2c2765e0e1f319d89f3daedfe3f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
Dominik Holland
2013-04-18 17:16:38 +02:00
committed by The Qt Project
parent 7b4c7bda73
commit 6e8db5a671
2 changed files with 4 additions and 3 deletions

View File

@@ -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()));
}

View File

@@ -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