Reset VideoSurface pointer when deleted
Change-Id: Iec74c8a8b914d2c2765e0e1f319d89f3daedfe3f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
7b4c7bda73
commit
6e8db5a671
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user