basesrc: pad task started before start_complete when seeking
Submitted by Andrew Oakley
Link to original bug (#734058)
Description
Created attachment 282178
Simple test case
To reproduce this you need to:
- create a basesrc based source element
- gst_base_src_set_async(src, TRUE)
- gst_element_set_state(src, GST_STATE_PLAYING)
- send a seek event at the pad
The task is now started without having called gst_base_src_start_complete. This means resource allocation in the start callback may not be complete.
It isn't clear what the plugin could do to handle this other than return failure from the fill function (or similar). Blocking in the fill function at this point leads to deadlocks.
Looking around gstbasesrc.c it appears there are other ways to trigger this issue. I suspect that some checks for GST_BASE_SRC_IS_STARTED are required with appropriate locking.
A test case is attached - it shouldn't assert.
Attachment 282178, "Simple test case":
asynctest.c
Version: 1.x