teletextdec: fix deadlock on a stream error
authorAndoni Morales Alastruey <amorales@flumotion.com>
Thu, 10 Jun 2010 11:55:30 +0000 (13:55 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 23 May 2011 13:17:41 +0000 (15:17 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=619739

ext/teletextdec/gstteletextdec.c

index 090990e..05c9d29 100644 (file)
@@ -678,8 +678,10 @@ gst_teletextdec_chain (GstPad * pad, GstBuffer * buf)
   g_mutex_lock (teletext->queue_lock);
   if (!g_queue_is_empty (teletext->queue)) {
     ret = gst_teletextdec_push_page (teletext);
-    if (ret != GST_FLOW_OK)
+    if (ret != GST_FLOW_OK) {
+      g_mutex_unlock (teletext->queue_lock);
       goto error;
+    }
   }
   g_mutex_unlock (teletext->queue_lock);