mpegtsmux: Remove an unnecessary check for NULL before g_free

This commit is contained in:
Jan Schmidt 2016-04-16 22:33:48 +10:00
parent 58465bc90f
commit 4e5b0b38a4

View file

@ -933,11 +933,9 @@ mpegtsmux_sink_event (GstCollectPads * pads, GstCollectData * data,
lang_code = gst_tag_get_language_code_iso_639_2B (lang); lang_code = gst_tag_get_language_code_iso_639_2B (lang);
if (lang_code) { 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); GST_DEBUG_OBJECT (pad, "Setting language to '%s'", lang_code);
g_free (pad_data->language);
pad_data->language = g_strdup (lang_code); pad_data->language = g_strdup (lang_code);
} else { } else {
GST_WARNING_OBJECT (pad, "Did not get language code for '%s'", lang); GST_WARNING_OBJECT (pad, "Did not get language code for '%s'", lang);