queue: Store sticky events on the srcpad if we're dropping them because of leaking
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 9 May 2013 10:50:20 +0000 (12:50 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 9 May 2013 10:50:20 +0000 (12:50 +0200)
plugins/elements/gstqueue.c

index e0e70302f3739fcf0bde17b6692cf3e78e00de83..71c710579c8b71e2a12c6739a603ce64a4c1f8dc 100644 (file)
@@ -913,6 +913,12 @@ gst_queue_leak_downstream (GstQueue * queue)
 
     GST_CAT_DEBUG_OBJECT (queue_dataflow, queue,
         "queue is full, leaking item %p on downstream end", leak);
+    if (GST_IS_EVENT (leak) && GST_EVENT_IS_STICKY (leak)) {
+      GST_CAT_DEBUG_OBJECT (queue_dataflow, queue,
+          "Storing sticky event %s on srcpad", GST_EVENT_TYPE_NAME (leak));
+      gst_pad_store_sticky_event (queue->srcpad, GST_EVENT_CAST (leak));
+    }
+
     if (!GST_IS_QUERY (leak))
       gst_mini_object_unref (leak);