avwait: Fix potential deadlock when flushing / shutting down audio
authorVivia Nikolaidou <vivia@toolsonair.com>
Thu, 2 Feb 2017 13:25:09 +0000 (15:25 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 2 Feb 2017 13:29:25 +0000 (15:29 +0200)
The mutex must be unlocked in the error case

https://bugzilla.gnome.org/show_bug.cgi?id=778076

gst/timecode/gstavwait.c

index 8e122c1113b9cc7e97b4344d0454008b96fcbcee..780ee80dfe8a66015c60ea265df794b7559c6fdb 100644 (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 =