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 553874 - query_position broken during seek
query_position broken during seek
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.18
Other All
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-26 02:07 UTC by Marcus Brinkmann
Modified: 2008-10-06 08:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test program that shows query_position problem during seek (3.84 KB, text/plain)
2008-09-26 02:11 UTC, Marcus Brinkmann
Details

Description Marcus Brinkmann 2008-09-26 02:07:54 UTC
Please describe the problem:
When I query the position of a playbin while a seek occurs, there is a race condition that the actual position returned is 0, even if the seek is from one non-null position to another, for example from 3 seconds to 5 seconds.  This occurs irregardless if the pipeline is paused or playing during the whole operation.

The race window seems to be located after a state change from PAUSED to PAUSED with pending PAUSED.  The attached example program illustrates the problem.  The race is reliably hit in 0.10.18, but also occurs in 0.10.20, although the window seems smaller.

Other possibilities beside a race condition: It may be that the query_position call is supposed to fail.  In this case, it should return FALSE instead of TRUE.  That the function returns TRUE and position 0 may be a different bug.  Furthermore, if the function is supposed to fail while there are pending state changes, this should be clearly documented.  I could not find any restriction on query_position in the documentation of it or that of the pending state.


Steps to reproduce:
1. Run the attached example program on an ogg file that is at least 10 seconds long.  Also try it with the initial state being PLAYING instead of PAUSING.  The output and expected output is detailed in a comment in the source. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Marcus Brinkmann 2008-09-26 02:11:22 UTC
Created attachment 119395 [details]
test program that shows query_position problem during seek

Compile with;

$ cc -g -Wall `pkg-config --cflags libglade-2.0 libgnomeui-2.0 gstreamer-0.10` `pkg-config --libs libglade-2.0 libgnomeui-2.0 gstreamer-0.10` -rdynamic helloworld.c   -o helloworld

Run with ogg file longer than 10 seconds.
Comment 2 Wim Taymans 2008-10-06 08:58:32 UTC
        * libs/gst/base/gstbasesink.c: (gst_base_sink_get_position),
        (gst_base_sink_query):
        Improve position reporting while flushing and other intermediate state
        changes. Fixes #553874.