Duration and position read problem

Paolo Micanti paomic at gmail.com
Mon Dec 19 02:58:54 PST 2011


Hi all,

I'm using the gstreamer api to play some videos on an embedded system. The
playback is fine, but I get a strange problem when trying to get the
duration and position of the playback. In particular, I regularly call a
function that reads the total duration and position of the playback, using
the lines below

 

len = 0;

pos = 0;

gst_element_query_duration(pipeline,&fmt,&len);

gst_element_query_position (pipeline, &fmt, &pos);

 

My problem is that when the playback is finished, the position is greater
than the total duration, for example:

 

0:00:46.007844442 / 0:00:45.680000000

 

This happens only with some kind of videos, in particular with mpeg 1 and
mpeg 2, while using h.254/mpeg 4 it seems to work fine. Is this some kind of
bug, or am I missing something?

 

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111219/4534658d/attachment.htm>


More information about the gstreamer-devel mailing list