audioencoder: If there are no tags, don't try to do event handling on a NULL event

Fixes some crashes.
This commit is contained in:
Sebastian Dröge 2015-08-18 15:58:57 +03:00
parent cca823b490
commit 2de91c32e4

View 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 */
}