asfdemux: Only use segment.start as seek_time if it is relative
authorThiago Santos <ts.santos@partner.samsung.com>
Tue, 24 Sep 2013 17:08:10 +0000 (10:08 -0700)
committerThiago Santos <ts.santos@partner.samsung.com>
Tue, 24 Sep 2013 21:43:34 +0000 (14:43 -0700)
commit556055e2f1e2238c0d9cb67b0922635b69917f97
tree8780afded096896365e73b2bff712288264032f0
parentabe5ca6d962fdd34c1292b71f72495475eac2174
asfdemux: Only use segment.start as seek_time if it is relative

Relying on the gst_segment_do_seek results for getting the
seeking time should not be used if seek type is SET because the
do_seek function makes the 'cur` position of the seek normalized
on the segment range. This means that seeking beyond the end of the
file might not result in instant EOS as it will end up seeking to
the final ts of the file.

In asf seeking to the final timestamp can lead to seeking to the last
keyframe, meaning a few seconds of video will still be played, which should
not be the desired behavior when seeking beyong file limits.
gst/asfdemux/gstasfdemux.c