summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-05-17 13:22:32 +0200
committerLars Knoll <lars.knoll@qt.io>2021-05-18 08:44:08 +0000
commitac2f3c0ef78e8374dea63b658959a8a6db890bca (patch)
treefc78ece37f19d790263b4ab7715586c62aac15f0 /src
parente6800008635d992ad0339048729f6b452b3bc10d (diff)
Fix a memory leak in gstreamer
Change-Id: I663c1f1de4fe6ca25f4f6aa353084701d2c9751d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/platform/gstreamer/common/qgst_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/multimedia/platform/gstreamer/common/qgst_p.h b/src/multimedia/platform/gstreamer/common/qgst_p.h
index d98e6d24a..37d118cc3 100644
--- a/src/multimedia/platform/gstreamer/common/qgst_p.h
+++ b/src/multimedia/platform/gstreamer/common/qgst_p.h
@@ -186,7 +186,13 @@ public:
Q_MULTIMEDIA_EXPORT QVideoFrameFormat::PixelFormat pixelFormat() const;
Q_MULTIMEDIA_EXPORT QGRange<float> frameRateRange() const;
- QByteArray toString() const { return gst_structure_to_string(structure); }
+ QByteArray toString() const
+ {
+ char *s = gst_structure_to_string(structure);
+ QByteArray str(s);
+ g_free(s);
+ return str;
+ }
QGstStructure copy() const { return gst_structure_copy(structure); }
};