From: Sebastian Dröge Date: Tue, 18 Aug 2015 12:58:57 +0000 (+0300) Subject: audioencoder: If there are no tags, don't try to do event handling on a NULL event X-Git-Tag: 1.6.0~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2de91c32e416b9547561d331e167189cd87bb3bd;p=platform%2Fupstream%2Fgst-plugins-base.git audioencoder: If there are no tags, don't try to do event handling on a NULL event Fixes some crashes. --- diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 2ff8430..17f843a 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 */ }