audiobasesrc: posting errors should be always be safe

Don't try to signal an error in the ringbuffer if it hasn't been
allocated yet.

https://bugzilla.gnome.org/show_bug.cgi?id=794611
This commit is contained in:
Nirbheek Chauhan 2018-04-09 17:24:30 +05:30
parent baadc3b302
commit b5698995f1

View file

@ -1213,7 +1213,7 @@ gst_audio_base_src_post_message (GstElement * element, GstMessage * message)
GstAudioBaseSrc *src = GST_AUDIO_BASE_SRC (element);
gboolean ret;
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR && src->ringbuffer) {
GstAudioRingBuffer *ringbuffer;
GST_INFO_OBJECT (element, "subclass posted error");