<div dir="ltr"><p><br>Hi,</p><p>On specified pipeline I'm executing a lot of seeks by gst_element_seek and on event GST_MESSAGE_SEGMENT_DONE I want to know the exact position.<br>When GST_MESSAGE_SEGMENT_DONE is recieved the position is retrieved by command gst_element_query_position.<br>But it seems that this position is about 2 seconds before the end time used in the gst_element_seek command.<br>Since the file src has 3 I-frames/sec this should not be possible, since the difference could be max 1/3 of a second.</p><p>At the same time I'm also retreiving the position via gst_message_parse_segment_done for verification.<br>It seems that this time is totally different from the other positions. </p><p>used gst_element_seek end position          =   207806002686<br>reply gst_element_query_position              =    205968000000<br>reply gst_message_parse_segment_done =  3566703002686 </p><p><br>Has anyone am Idea what I'm doing wrong? Do I have to flush the pipeline somehow before the gst_element_query_position?<br>What kind os position is gst_message_parse_segment_done returning? The gstreamer doc is not quit clear to me. How can I calculate the position from this one?</p><p>Used pipeline : filesrc ! matroskademux ! queue2 ! appsink ! appsrc! h264parse! queue2 ! matroskamux ! filesink</p><p>Used seek     : gst_element_seek with flags GstSeekFlags(GST_SEEK_FLAG_FLUSH |GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE) .<br>                        The GST_SEEK_FLAG_FLUSH is only used with the first gst_element_seek command.</p><p><br>Any help is appreciated.<br>marc</p></div>