Fix a few memory leaks.
XV Buffer pool was leaking, the sink delegate was leaking, and the sink wasn't chaining to parent class so GstObject stuff was leaking. Change-Id: I5d6b6fe59dfb2b3c5367dfde8331e5943167b55d Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
0ae0ad6468
commit
34f2494df1
@@ -78,7 +78,7 @@ QVideoSurfaceGstDelegate::QVideoSurfaceGstDelegate(
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_XVIDEO
|
||||
m_pools.append(new QGstXvImageBufferPool());
|
||||
m_pools.append(new QGstXvImageBufferPool(this));
|
||||
#endif
|
||||
updateSupportedFormats();
|
||||
connect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(updateSupportedFormats()));
|
||||
@@ -87,7 +87,6 @@ QVideoSurfaceGstDelegate::QVideoSurfaceGstDelegate(
|
||||
|
||||
QVideoSurfaceGstDelegate::~QVideoSurfaceGstDelegate()
|
||||
{
|
||||
qDeleteAll(m_pools);
|
||||
setLastPrerolledBuffer(0);
|
||||
}
|
||||
|
||||
@@ -502,6 +501,11 @@ void QVideoSurfaceGstSink::finalize(GObject *object)
|
||||
if (sink->lastRequestedCaps)
|
||||
gst_caps_unref(sink->lastRequestedCaps);
|
||||
sink->lastRequestedCaps = 0;
|
||||
|
||||
delete sink->delegate;
|
||||
|
||||
// Chain up
|
||||
G_OBJECT_CLASS(sink_parent_class)->finalize(object);
|
||||
}
|
||||
|
||||
GstStateChangeReturn QVideoSurfaceGstSink::change_state(
|
||||
|
||||
Reference in New Issue
Block a user