Menu

#66 Fix wrong elapsed time due to MPEG-TS PTS rollover

Unstable_(example)
closed-accepted
nobody
PTS (1) Time (1)
5
2015-04-24
2015-04-22
No

MPEG-TS files (e.g. DVB recordings) have a 2^33 wide PTS (playback timestamp) value regularly embedded, which is used by MPlayer to output the current time. As this timestamp is not (necessarily) 0 at the start of the file, in SMPlayer mset.starting_time is subtracted from mset.current_sec to get the elapsed time since the file start.

This only works if mset.current_sec > mset.starting_time is valid. But if between the file start and the current position there is a PTS rollover, this leads to a negative value displayed by SMPlayer.

The attached patch fixes this issue by compensating this PTS rollover. You can find a test MPEG-TS file at http://www.basicmaster.de/test/PTS_rollover.ts which is 20s long and has a PTS rollover at 10s.

1 Attachments

Discussion

  • Ricardo Villalba

    I've just applied your patch (svn r6885).

    Thank you.

     
  • Ricardo Villalba

    • status: open --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB