audiodecoder: Clear taglist on reception of a STREAM_START event
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Fri, 26 Jul 2013 00:47:02 +0000 (20:47 -0400)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 12 Aug 2013 11:02:59 +0000 (13:02 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=705109

gst-libs/gst/audio/gstaudiodecoder.c

index 0da8356c49a2b5a4ce5d35e26a3fbdacb38406e9..7d1d0d5e162178012ffaac562849a44af39fdc0c 100644 (file)
@@ -1701,6 +1701,14 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
     case GST_EVENT_STREAM_START:
       GST_AUDIO_DECODER_STREAM_LOCK (dec);
       gst_audio_decoder_drain (dec);
+
+      GST_DEBUG_OBJECT (dec, "received STREAM_START. Clearing taglist");
+      /* Flush our merged taglist after a STREAM_START */
+      if (dec->priv->taglist) {
+        gst_tag_list_unref (dec->priv->taglist);
+        dec->priv->taglist = NULL;
+      }
+      dec->priv->taglist_changed = FALSE;
       GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
 
       ret = gst_audio_decoder_push_event (dec, event);