Race condition leads to missing ASYNC_DONE bus messages when seeking
Submitted by Alex
Link to original bug (#740121)
Description
After calling gst_element_send_event to do a flushing seek, GST_MESSAGE_ASYNC_DONE should be received on the bus. Usually, this happens, however sometimes the message is never received. Enabling a lot of logging makes this occur much more frequently. This is a blocker because if an application does a lot of seeking (such as scrubbing with a slider), and waits for the ASYNC_DONE message before proceeding, it will eventually deadlock. This makes seeking unusable.
I don't think this bug existed with 0.10.
The following bug might have the same underlying cause: https://bugzilla.gnome.org/show_bug.cgi?id=734060
To reproduce, run the code attached (change line 165 to point to an existing video of your choice that supports seeking). It will most likely run to the end and then crash (proper cleanup code and most error checking has been removed to prune down the example). Then run it again with GST_DEBUG=3,GST_STATES:4,myplugin:9 - this time it will probably deadlock after 1 seek.
Version: 1.4.4