Buffers were kept allocated until the player is destroyed or
next media played.
Change-Id: I8a0c85da3a82ac6883075a1d0674143783c7f010
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
return !m_surface.isNull() && m_surface->isActive();
}
+void QVideoSurfaceGstDelegate::clearPoolBuffers()
+{
+ QMutexLocker locker(&m_poolMutex);
+ if (m_pool)
+ m_pool->clear();
+}
+
GstFlowReturn QVideoSurfaceGstDelegate::render(GstBuffer *buffer)
{
if (!m_surface) {
gboolean QVideoSurfaceGstSink::stop(GstBaseSink *base)
{
- Q_UNUSED(base);
+ VO_SINK(base);
+ sink->delegate->clearPoolBuffers();
return TRUE;
}
QGstBufferPoolInterface *pool() { return m_pool; }
QMutex *poolMutex() { return &m_poolMutex; }
+ void clearPoolBuffers();
GstFlowReturn render(GstBuffer *buffer);