GNOME Bugzilla – Bug 616396
[playbin2] might fail a duration query immediately following PAUSED state
Last modified: 2010-04-30 11:40:50 UTC
Created attachment 159252 [details] [review] Only return cached duration during group switch if there is a cached one. playbin2 special cases duration query and provides cached duration if there is a stream-changed message still pending (which should be posted by downstream sinks when they receive the message event that has been sent downstream earlier). Consider a mainloop receiving a state change to PAUSED and then issuing a duration query. Then there is a race between this mainloop and the rendering/posting of the stream-changed message. If the former is "faster", then playbin2 will look for a cached duration response (which can not be present yet as all is still starting up). Possible patch attached (though something more nifty might be possible ...)
That's probably a good idea... it should really only happen for the very first group activation and not for any group switches though.
commit db4ccd86101e408bec622d7c7558b56876e9bb49 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Fri Apr 30 13:36:59 2010 +0200 playbin2: forward duration query duration during group switch if no cached duration ... such as during first group setup. Fixes #616396.