diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2015-03-02 17:04:20 +0100 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2015-03-06 10:37:40 +0100 |
commit | 7524b5eea620f97bbd2ff02507fa0433c602d7da (patch) | |
tree | ac7504bb3f0a9748e29a3fbe54a51b124c60762d /gst/vaapi | |
parent | 73b726418b8233c5f8edbed89496cf95d79cf27c (diff) | |
download | gst-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')
-rw-r--r-- | gst/vaapi/gstvaapisink.c | 8 |
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 } |