GNOME Bugzilla – Bug 734256
Seeking doesn't work in Python
Last modified: 2014-08-05 01:02:13 UTC
Created attachment 282488 [details] Simple example, calls seek_simple on pipeline Seeking on an element or pipeline does not work (for me, at least) in Python. Code examples (ported from C) that should work fine simply hang on the last frame. I've attached a couple of examples, change the URI variable to the URI of a video file to test.
Created attachment 282489 [details] Complex bug example, sends seek event to uridecodebin's src pad
Turns out I'm an idiot, the uridecodebin unlinks itself and removes most of its elements before I caught the EOS. Closing bug...
Created attachment 282490 [details] Fixed test-case The basic problem is that you can't do a flushing seek from an event probe, as the pipeline can't stop streaming until the event probe returns. Equally, you can't do a non-flushing seek once EOS has been sent, as pads will ignore all subsequent data (not sure why we made it that way, maybe something we should change in the future). The solution is to defer the flushing seek to the mainloop and drop the EOS event, as in this variant of the first test case. Thanks for providing a good test case, by the way - helps a lot.