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 673508 - [basesink] gst_base_sink_get_position - wrong state
[basesink] gst_base_sink_get_position - wrong state
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.x
Other All
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-04 14:20 UTC by Julien Lehuraux
Modified: 2012-05-18 06:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Julien Lehuraux 2012-04-04 14:20:01 UTC
Summary :

When querying position (get position) after seeking (set position) repeatedly, basesink function gst_base_sink_get_position may hit :

if (!basesink->have_newsegment)
    goto wrong_state;

because the query occured between a flush stop and a new segment.


Steps to reproduce :

* Alternate calls to set/get position on any pipeline with any basesink subclassed element.
* get position may send -1.
* Try it in pause state.


Expected results :

gst_base_sink_get_position delayed until new segment has been received, basesink->have_newsegment == TRUE.
Comment 1 Wim Taymans 2012-05-18 06:49:22 UTC
It is normal that the query position can return -1 when the pipeline is not yet prerolled (after a seek, when starting). You need to wait for the ASYNC_DONE message before you can reliably query the position and duration.