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
This commit is contained in:
Seungha Yang 2018-06-15 22:48:42 +09:00 committed by Thibault Saunier
parent ecd58f2775
commit 5934fb1bb6

View file

@ -891,13 +891,14 @@ gst_video_aggregator_default_update_caps (GstVideoAggregator * vagg,
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",