tsdemux: Don't leak a taglist if a taglist has already been created
authorGraham Leggett <minfrin@sharp.fm>
Sun, 18 Dec 2016 19:18:23 +0000 (19:18 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 22 Dec 2016 12:45:05 +0000 (14:45 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=776244

gst/mpegtsdemux/mpegtsbase.c

index a36ed41756104a0490dbc47769af20e28522766f..ee2460c2812199bcddc41b9a66f11cf5c1a184ee 100644 (file)
@@ -1243,7 +1243,9 @@ mpegts_base_get_tags_from_eit (MpegTSBase * base, GstMpegtsSection * section)
 
           if (gst_mpegts_descriptor_parse_dvb_short_event (desc, NULL, &name,
                   &text)) {
-            program->tags = gst_tag_list_new_empty ();
+            if (!program->tags)
+              program->tags = gst_tag_list_new_empty ();
+
             if (name) {
               gst_tag_list_add (program->tags, GST_TAG_MERGE_APPEND,
                   GST_TAG_TITLE, name, NULL);