GNOME Bugzilla – Bug 673508
[basesink] gst_base_sink_get_position - wrong state
Last modified: 2012-05-18 06:49:22 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.
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.