videoaggregator: Fix string leak
gst_video_colorimetry_to_string() returns allocated memory which
must be freed.
https://bugzilla.gnome.org/show_bug.cgi?id=796596
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index 383beb3..b155ff0 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -661,13 +661,14 @@
gst_caps_unref (tmp);
}
+ color_name = gst_video_colorimetry_to_string (&best_info.colorimetry);
+
GST_DEBUG_OBJECT (vagg,
"The output format will now be : %d with chroma : %s and colorimetry %s",
best_format, gst_video_chroma_to_string (best_info.chroma_site),
- gst_video_colorimetry_to_string (&best_info.colorimetry));
+ color_name);
best_format_caps = gst_caps_copy (caps);
- color_name = gst_video_colorimetry_to_string (&best_info.colorimetry);
gst_caps_set_simple (best_format_caps, "format", G_TYPE_STRING,
gst_video_format_to_string (best_format), "chroma-site", G_TYPE_STRING,
gst_video_chroma_to_string (best_info.chroma_site), "colorimetry",