gstreamer: Fix string memory leak
The string returned by `gst_video_colorimetry_to_string()`
has to be freed, this was missing.
Fixes: fc9783acc6 ("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>
This commit is contained in:
committed by
Laurent Pinchart
parent
899087fe42
commit
f113464b34
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user