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().
This commit is contained in:
Gwenole Beauchesne 2015-03-02 17:04:20 +01:00
parent 73b726418b
commit 7524b5eea6

View file

@ -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
}