decodebin: Need to lock the chain mutex in autoplug_query
authorSebastian Dröge <slomo@circular-chaos.org>
Tue, 28 May 2013 09:40:51 +0000 (11:40 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Tue, 28 May 2013 09:40:51 +0000 (11:40 +0200)
gst/playback/gstdecodebin2.c

index 499fe10..c7c5ce1 100644 (file)
@@ -4239,6 +4239,7 @@ gst_decode_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
   GstDecodePad *dpad = GST_DECODE_PAD (parent);
   gboolean ret = FALSE;
 
+  CHAIN_MUTEX_LOCK (dpad->chain);
   if (!dpad->exposed && !dpad->chain->deadend) {
     ret = FALSE;
     g_signal_emit (G_OBJECT (dpad->dbin),
@@ -4265,6 +4266,7 @@ gst_decode_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
       gst_object_unref (target);
     }
   }
+  CHAIN_MUTEX_UNLOCK (dpad->chain);
 
   /* If exposed or nothing handled the query use the default handler */
   if (!ret)