pad: only serialized events can't pass after EOS
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 6 Jun 2012 07:13:11 +0000 (09:13 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 6 Jun 2012 07:14:58 +0000 (09:14 +0200)
Only serialized events can't be sent on pads that are EOS. Otherwise a seek
event would be refused as well.

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

gst/gstpad.c

index 0a443b8..d002e15 100644 (file)
@@ -4637,10 +4637,10 @@ gst_pad_send_event_unchecked (GstPad * pad, GstEvent * event,
       if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
         goto flushing;
 
-      if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
-        goto eos;
-
       if (serialized) {
+        if (G_UNLIKELY (GST_PAD_IS_EOS (pad)))
+          goto eos;
+
         /* lock order: STREAM_LOCK, LOCK, recheck flushing. */
         GST_OBJECT_UNLOCK (pad);
         GST_PAD_STREAM_LOCK (pad);