GNOME Bugzilla – Bug 787974
player: race condition when seeking
Last modified: 2017-09-24 09:26:09 UTC
The race condition happens between seek() and state_changed_cb() Under some conditions, the state_changed_cb() can end up removing the seek_source while it is being created and setup by seek(). This will lead to a null pointer de-reference in seek(). Adding a sleep (of, say, 250ms) after self->seek_source = g_timeout_source_new (delay); will greatly increase the probability of triggering the race condition. Taking the player lock while creating and setting up the seek_source seems to address the issue. I'll submit a patch later.
False alarm. The race condition was found on a python port of gstplayer. The port was not taking a lock in seek() as it should.