libtriple: improve cPlayback()

* avoid race conditions by using a mutex to protect curr_pos, fixing
 artefacts during timeshift playback
* make GetPosition() cheaper by interpolating end_pts and only fetching
 the "real" end_pts after the file has grown by 10MB


Origin commit data
------------------
Commit: ec2ad396c0
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-01-02 (Sun, 02 Jan 2011)

Origin message was:
------------------
libtriple: improve cPlayback()

* avoid race conditions by using a mutex to protect curr_pos, fixing
 artefacts during timeshift playback
* make GetPosition() cheaper by interpolating end_pts and only fetching
 the "real" end_pts after the file has grown by 10MB
This commit is contained in:
Stefan Seyfried
2011-01-02 19:16:12 +01:00
parent 94cddaf48c
commit cb95a929f1
2 changed files with 44 additions and 12 deletions

View File

@@ -77,6 +77,7 @@ class cPlayback
int64_t pts_start;
int64_t pts_end;
int64_t _pts_end; /* last good endpts */
int64_t pts_curr;
int64_t get_pts(uint8_t *p, bool pes, int bufsize);