omxaudioenc: Fix deadlock in error case when draining
authorSatya Prakash Gupta <sp.gupta@samsung.com>
Mon, 17 Jul 2017 08:14:54 +0000 (13:44 +0530)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 17 Jul 2017 12:38:17 +0000 (15:38 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=784967

omx/gstomxaudioenc.c

index cf73998..a03eccc 100644 (file)
@@ -1154,6 +1154,7 @@ gst_omx_audio_enc_drain (GstOMXAudioEnc * self)
   if (err != OMX_ErrorNone) {
     GST_ERROR_OBJECT (self, "Failed to drain component: %s (0x%08x)",
         gst_omx_error_to_string (err), err);
+    g_mutex_unlock (&self->drain_lock);
     GST_AUDIO_ENCODER_STREAM_LOCK (self);
     return GST_FLOW_ERROR;
   }