From 4e5b0b38a46a53469bad25074123b2d11a2fc0de Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 16 Apr 2016 22:33:48 +1000 Subject: [PATCH] mpegtsmux: Remove an unnecessary check for NULL before g_free --- gst/mpegtsmux/mpegtsmux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 1ddf9f91f7..af051caeb1 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -933,11 +933,9 @@ 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); + + g_free (pad_data->language); pad_data->language = g_strdup (lang_code); } else { GST_WARNING_OBJECT (pad, "Did not get language code for '%s'", lang);