diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2024-05-14 17:45:39 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-05-14 23:45:19 +0300 |
commit | f113464b3481d76dee158a00c790b44671b382b7 (patch) | |
tree | fa2a61a120828aee0e2914481a670650b90f7af0 /src | |
parent | 899087fe42d98a2847b1324f9224f731c7a8f91c (diff) |
gstreamer: Fix string memory leak
The string returned by `gst_video_colorimetry_to_string()`
has to be freed, this was missing.
Fixes: fc9783acc6083a ("gstreamer: Provide colorimetry <> ColorSpace mappings")
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gstreamer/gstlibcamera-utils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp index e163ce41..ec4da435 100644 --- a/src/gstreamer/gstlibcamera-utils.cpp +++ b/src/gstreamer/gstlibcamera-utils.cpp @@ -385,7 +385,7 @@ gst_libcamera_stream_configuration_to_caps(const StreamConfiguration &stream_cfg if (stream_cfg.colorSpace) { GstVideoColorimetry colorimetry = colorimetry_from_colorspace(stream_cfg.colorSpace.value()); - gchar *colorimetry_str = gst_video_colorimetry_to_string(&colorimetry); + g_autofree gchar *colorimetry_str = gst_video_colorimetry_to_string(&colorimetry); if (colorimetry_str) gst_structure_set(s, "colorimetry", G_TYPE_STRING, colorimetry_str, nullptr); |