[MPlayer-dev-eng] PATCH: demux_mpg returns invalid percent pos after seek.

elupus elupus at ecce.se
Tue Feb 8 15:17:55 CET 2005


Some mpegs with valid timestamps will not get a propery last_pts set
immidiatly after a seek has finished. This causes
DEMUXER_CTRL_GET_PERCENT_POS, to return percent pos 0 instead of saying that
it doesn't know. It only happens sometimes when seeking, so i suppose the
file might be somewhat damaged.

Maybe has_valid_timestamps should be set to 0 in such a case, but this fix
just makes sure last_pts has a value and if not reverts to calculation of
percentpos to using number of bytes read and total bytes instead of
timestamps, and goes back to timestamps as soon as it is found again.

elupus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: percentpos.patch
Type: application/octet-stream
Size: 738 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050208/91168612/attachment.obj>


More information about the MPlayer-dev-eng mailing list