After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616396 - [playbin2] might fail a duration query immediately following PAUSED state
[playbin2] might fail a duration query immediately following PAUSED state
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.30
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-21 12:55 UTC by Mark Nauwelaerts
Modified: 2010-04-30 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Only return cached duration during group switch if there is a cached one. (1.30 KB, patch)
2010-04-21 12:55 UTC, Mark Nauwelaerts
committed Details | Review

Description Mark Nauwelaerts 2010-04-21 12:55:08 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 ...)
Comment 1 Sebastian Dröge (slomo) 2010-04-21 13:25:04 UTC
That's probably a good idea... it should really only happen for the very first group activation and not for any group switches though.
Comment 2 Mark Nauwelaerts 2010-04-30 11:40:06 UTC
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.