qtdemux: fix deadlock in error code path
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 24 Oct 2010 17:50:30 +0000 (18:50 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 24 Oct 2010 17:57:59 +0000 (18:57 +0100)
GST_ELEMENT_ERROR must not be called with the object lock held,
since it will call gst_object_get_parent() internally, which
takes the object lock as well.

gst/qtdemux/qtdemux.c

index ced1e4d..c3ceaa9 100644 (file)
@@ -4808,9 +4808,9 @@ out_of_samples:
   }
 corrupt_file:
   {
+    GST_OBJECT_UNLOCK (qtdemux);
     GST_ELEMENT_ERROR (qtdemux, STREAM, DEMUX,
         (_("This file is corrupt and cannot be played.")), (NULL));
-    GST_OBJECT_UNLOCK (qtdemux);
     return FALSE;
   }
 }