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 e786a4ef75
commit ec2ad396c0
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);