avwait: Fix potential deadlock when flushing / shutting down audio

The mutex must be unlocked in the error case

https://bugzilla.gnome.org/show_bug.cgi?id=778076
This commit is contained in:
Vivia Nikolaidou 2017-02-02 15:25:09 +02:00 committed by Sebastian Dröge
parent 2ab19144be
commit a5933dc002

View file

@ -666,6 +666,7 @@ gst_avwait_asink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
if (self->audio_flush_flag || self->shutdown_flag) {
GST_DEBUG_OBJECT (self, "Shutting down, ignoring frame");
gst_buffer_unref (inbuf);
g_mutex_unlock (&self->mutex);
return GST_FLOW_FLUSHING;
}
duration =