audiodecoder: If there are no tags, don't try to do event handling on a NULL event
authorSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2015 13:01:28 +0000 (16:01 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2015 13:01:28 +0000 (16:01 +0300)
Fixes some crashes.

gst-libs/gst/audio/gstaudiodecoder.c

index d6a5e63..f4c663a 100644 (file)
@@ -2343,6 +2343,12 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
         event = gst_audio_decoder_create_merged_tags_event (dec);
         dec->priv->taglist_changed = FALSE;
         GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+
+        /* No tags, go out of here instead of fall through */
+        if (!event) {
+          ret = TRUE;
+          break;
+        }
       }
 
       /* fall through */