Don't delete video node factories owned by the plugin loader.
Make the fallback factories members instead of creating on the heap so there's no need to delete members of the m_videoNodeFactories some of which may be shared with other current and future video outputs. Change-Id: I3d2e32e52479b12ff64e31a2ed527336d94a191b Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
ba43d50b31
commit
655408bced
@@ -183,8 +183,8 @@ QDeclarativeVideoOutput::QDeclarativeVideoOutput(QQuickItem *parent) :
|
||||
}
|
||||
|
||||
// Append existing node factories as fallback if we have no plugins
|
||||
m_videoNodeFactories.append(new QSGVideoNodeFactory_I420);
|
||||
m_videoNodeFactories.append(new QSGVideoNodeFactory_RGB);
|
||||
m_videoNodeFactories.append(&m_i420Factory);
|
||||
m_videoNodeFactories.append(&m_rgbFactory);
|
||||
}
|
||||
|
||||
QDeclarativeVideoOutput::~QDeclarativeVideoOutput()
|
||||
@@ -197,7 +197,6 @@ QDeclarativeVideoOutput::~QDeclarativeVideoOutput()
|
||||
m_source.clear();
|
||||
_q_updateMediaObject();
|
||||
delete m_surface;
|
||||
qDeleteAll(m_videoNodeFactories);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
|
||||
#include <private/qsgvideonode_p.h>
|
||||
|
||||
|
||||
#include "qsgvideonode_i420.h"
|
||||
#include "qsgvideonode_rgb.h"
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSGVideoItemSurface;
|
||||
@@ -144,6 +149,9 @@ private:
|
||||
FillMode m_fillMode;
|
||||
QSize m_nativeSize;
|
||||
|
||||
QSGVideoNodeFactory_I420 m_i420Factory;
|
||||
QSGVideoNodeFactory_RGB m_rgbFactory;
|
||||
|
||||
bool m_geometryDirty;
|
||||
QRectF m_lastSize; // Cache of last size to avoid recalculating geometry
|
||||
QRectF m_renderedRect; // Destination pixel coordinates, clipped
|
||||
|
||||
Reference in New Issue
Block a user