summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-11-25 12:48:40 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-11-25 12:49:43 +0100
commitf0ba09d10e845ea8fb940e3996f8f9e28d01a3d3 (patch)
tree1a1f30226954754dd85ce5d1fc71c0a632d3d04d /gst-libs
parentc27bb822a8411119e7e9b16b980effe7eb1bec0a (diff)
downloadgstreamer-plugins-bad-f0ba09d10e845ea8fb940e3996f8f9e28d01a3d3.tar.gz
videoaggregator: Don't leak string
The result of gst_video_colorimetry_to_string () needs to be free'd
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstvideoaggregator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index 3cb812a4b..00e02768f 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -618,6 +618,7 @@ gst_video_aggregator_default_update_caps (GstVideoAggregator * vagg,
gboolean at_least_one_alpha = FALSE;
GstVideoFormat best_format;
GstVideoInfo best_info;
+ gchar *color_name;
best_format = GST_VIDEO_FORMAT_UNKNOWN;
gst_video_info_init (&best_info);
@@ -641,11 +642,12 @@ gst_video_aggregator_default_update_caps (GstVideoAggregator * vagg,
gst_video_colorimetry_to_string (&best_info.colorimetry));
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",
- G_TYPE_STRING, gst_video_colorimetry_to_string (&best_info.colorimetry),
- NULL);
+ G_TYPE_STRING, color_name, NULL);
+ g_free (color_name);
ret = gst_caps_merge (best_format_caps, gst_caps_ref (caps));
return ret;