summaryrefslogtreecommitdiff
path: root/gst/mpegtsmux
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2016-04-16 22:33:48 +1000
committerJan Schmidt <jan@centricular.com>2016-04-16 22:43:38 +1000
commit4e5b0b38a46a53469bad25074123b2d11a2fc0de (patch)
tree60ba49ef76127e79ccd88fcc14aafce69fc0951e /gst/mpegtsmux
parent58465bc90f2ee513c633b5ab2f230174ea482bfe (diff)
mpegtsmux: Remove an unnecessary check for NULL before g_free
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r--gst/mpegtsmux/mpegtsmux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 1ddf9f91f..af051caeb 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);