mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
mpegtsmux: free pad_data->language before g_strdup in order to avoid memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=765005
This commit is contained in:
parent
4ad32506c6
commit
6141cd2f4b
1 changed files with 4 additions and 0 deletions
|
@ -933,6 +933,10 @@ mpegtsmux_sink_event (GstCollectPads * pads, GstCollectData * data,
|
|||
|
||||
lang_code = gst_tag_get_language_code_iso_639_2B (lang);
|
||||
if (lang_code) {
|
||||
if (pad_data->language) {
|
||||
g_free (pad_data->language);
|
||||
pad_data->language = NULL;
|
||||
}
|
||||
GST_DEBUG_OBJECT (pad, "Setting language to '%s'", lang_code);
|
||||
pad_data->language = g_strdup (lang_code);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue