diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2017-11-29 12:32:36 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-03-21 15:11:29 +0000 |
commit | a429fb971beccf174f2df7f1ae8551a10d17d696 (patch) | |
tree | 18be5ba8268168e47ebea809226a64bacf65c299 /src | |
parent | 44b3628c1bbcf36655b8d62fcd082f6db5d92f9a (diff) | |
download | qtmultimedia-a429fb971beccf174f2df7f1ae8551a10d17d696.tar.gz |
Gstreamer: Fix leak in prepare-window-handle message
If the handler returns GST_BUS_DROP, it should unref the message,
else the message should not be unreffed by the sync handler.
The message is not going to be unreffed after handler call is made.
Task-number: QTBUG-64142
Change-Id: Ib44f574e95457cdfab66b390c691a8b572987d66
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gsttools/qgstreamerbushelper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gsttools/qgstreamerbushelper.cpp b/src/gsttools/qgstreamerbushelper.cpp index bd35d4b0a..bad1d210a 100644 --- a/src/gsttools/qgstreamerbushelper.cpp +++ b/src/gsttools/qgstreamerbushelper.cpp @@ -143,8 +143,10 @@ static GstBusSyncReply syncGstBusFilter(GstBus* bus, GstMessage* message, QGstre QMutexLocker lock(&d->filterMutex); for (QGstreamerSyncMessageFilter *filter : qAsConst(d->syncFilters)) { - if (filter->processSyncMessage(QGstreamerMessage(message))) + if (filter->processSyncMessage(QGstreamerMessage(message))) { + gst_message_unref(message); return GST_BUS_DROP; + } } return GST_BUS_PASS; |