GNOME Bugzilla – Bug 635718
[basesrc] custom, non-OOB events aren't pushed downstream
Last modified: 2011-04-07 08:55:38 UTC
Created attachment 175189 [details] Example code that should work but doesn't because of the missing gstreamer ability http://cgit.freedesktop.org/gstreamer/gstreamer/tree/libs/gst/base/gstbasesrc.c#n1639 As can be seen here, custom events aren't passed on. This affects situations where we try to send a custom event down a bin to handle EOS etc. I've attached sample code where the failure is demonstrated. It was suggested by thaytan on IRC and it was actually thaytan who found the missing code above...
commit 09f4b25f6bc049db353af361d82f7ab68b145428 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Apr 7 10:40:16 2011 +0200 basesrc: Drop delayed events after flushing commit 1d9cd86af6a90808d04893a72230061632140e2a Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Apr 7 10:29:41 2011 +0200 basesrc: Send syncronized custom downstream/both events downstream from the Instead of just silently dropping them. The same was done for tag events before already. Fixes bug #635718.
There are two refcount problems in your sample btw. * gst_bin_get_by_name() returns a new ref and you should unref the element again after usage * gst_element_send_event() takes ownership of the event, if you want to use the event afterwards (e.g. send it a second time) you have to increase the refcount before sending it