mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libtriple: fix seeking in cPlayback if there's a PTS overflow
Origin commit data
------------------
Branch: master
Commit: 56902846da
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-03-07 (Mon, 07 Mar 2011)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -223,6 +223,8 @@ bool cPlayback::Start(char *filename, unsigned short vp, int vtype, unsigned sho
|
|||||||
}
|
}
|
||||||
pts_curr = pts_start;
|
pts_curr = pts_start;
|
||||||
bytes_per_second = -1;
|
bytes_per_second = -1;
|
||||||
|
if (pts_end != -1 && pts_start > pts_end) /* PTS overflow during this file */
|
||||||
|
pts_end += 0x200000000ULL;
|
||||||
int duration = (pts_end - pts_start) / 90000;
|
int duration = (pts_end - pts_start) / 90000;
|
||||||
if (duration > 0)
|
if (duration > 0)
|
||||||
bytes_per_second = mf_getsize() / duration;
|
bytes_per_second = mf_getsize() / duration;
|
||||||
@@ -479,7 +481,10 @@ bool cPlayback::GetPosition(int &position, int &duration)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pts_end != -1 && pts_start > pts_end) /* should trigger only once ;) */
|
if (pts_end != -1 && pts_start > pts_end) /* should trigger only once ;) */
|
||||||
|
{
|
||||||
pts_end += 0x200000000ULL;
|
pts_end += 0x200000000ULL;
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (pts_curr != -1 && pts_curr < pts_start)
|
if (pts_curr != -1 && pts_curr < pts_start)
|
||||||
tmppts = pts_curr + 0x200000000ULL - pts_start;
|
tmppts = pts_curr + 0x200000000ULL - pts_start;
|
||||||
|
Reference in New Issue
Block a user