summaryrefslogtreecommitdiffstats
path: root/src/gsttools/qgstreamervideorenderer.cpp
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-03-20 19:20:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-21 19:16:09 +0100
commit023c6ebcb9d990042f0e9a750fd6238d22001022 (patch)
treeb98e068ccbdae0a587179d657541cc857c9daf0c /src/gsttools/qgstreamervideorenderer.cpp
parent60ba0afbde0ef53a12afb6c755ca6fd64aabf5da (diff)
GStreamer: fix memory leaks.
Many GStreamer objects were not properly managed or never released. Change-Id: I38b3854e8b9e2264b5b647f331d3bb16b886e2d6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/gsttools/qgstreamervideorenderer.cpp')
-rw-r--r--src/gsttools/qgstreamervideorenderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gsttools/qgstreamervideorenderer.cpp b/src/gsttools/qgstreamervideorenderer.cpp
index 5b0b0d7d..36c9f78d 100644
--- a/src/gsttools/qgstreamervideorenderer.cpp
+++ b/src/gsttools/qgstreamervideorenderer.cpp
@@ -41,6 +41,7 @@
#include "qgstreamervideorenderer_p.h"
#include <private/qvideosurfacegstsink_p.h>
+#include <private/qgstutils_p.h>
#include <qabstractvideosurface.h>
#include <QDebug>
@@ -62,8 +63,7 @@ GstElement *QGstreamerVideoRenderer::videoSink()
{
if (!m_videoSink && m_surface) {
m_videoSink = QVideoSurfaceGstSink::createSink(m_surface);
- gst_object_ref(GST_OBJECT(m_videoSink)); //Take ownership
- gst_object_sink(GST_OBJECT(m_videoSink));
+ qt_gst_object_ref_sink(GST_OBJECT(m_videoSink)); //Take ownership
}
return reinterpret_cast<GstElement*>(m_videoSink);