From 2de91c32e416b9547561d331e167189cd87bb3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Aug 2015 15:58:57 +0300 Subject: [PATCH] audioencoder: If there are no tags, don't try to do event handling on a NULL event Fixes some crashes. --- gst-libs/gst/audio/gstaudioencoder.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 2ff8430a84..17f843aeb1 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -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 */ }