summaryrefslogtreecommitdiff
path: root/gst/vaapi/gstvaapisink.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2015-03-02 17:04:20 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2015-03-06 10:37:40 +0100
commit7524b5eea620f97bbd2ff02507fa0433c602d7da (patch)
treeac7504bb3f0a9748e29a3fbe54a51b124c60762d /gst/vaapi/gstvaapisink.c
parent73b726418b8233c5f8edbed89496cf95d79cf27c (diff)
downloadgst-vaapi-7524b5eea620f97bbd2ff02507fa0433c602d7da.tar.gz
vaapisink: fix minor memory leak in debug mode.
The gst_video_colorimetry_to_string() function returns a newly created string that represents the GstVideoColorimetry value. So, that needs to be released after usage, in e.g. GST_DEBUG().
Diffstat (limited to 'gst/vaapi/gstvaapisink.c')
-rw-r--r--gst/vaapi/gstvaapisink.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index dbd8388d..7572c8e1 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -1282,7 +1282,13 @@ update_colorimetry (GstVaapiSink * sink, GstVideoColorimetry * cinfo)
else
sink->color_standard = 0;
- GST_DEBUG ("colorimetry %s", gst_video_colorimetry_to_string (cinfo));
+#ifndef GST_DISABLE_GST_DEBUG
+ {
+ gchar *const colorimetry_string = gst_video_colorimetry_to_string (cinfo);
+ GST_DEBUG ("colorimetry %s", colorimetry_string);
+ g_free (colorimetry_string);
+ }
+#endif
#endif
}