audioencoder: 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 12:58:57 +0000 (15:58 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 18 Aug 2015 12:58:57 +0000 (15:58 +0300)
Fixes some crashes.

gst-libs/gst/audio/gstaudioencoder.c

index 2ff8430..17f843a 100644 (file)
@@ -1641,6 +1641,12 @@ gst_audio_encoder_sink_event_default (GstAudioEncoder * enc, GstEvent * event)
         gst_event_unref (event);
         event = gst_audio_encoder_create_merged_tags_event (enc);
         GST_AUDIO_ENCODER_STREAM_UNLOCK (enc);
+
+        /* No tags, go out of here instead of fall through */
+        if (!event) {
+          res = TRUE;
+          break;
+        }
       }
       /* fall through */
     }