summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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); }
};