When the duratation of an audio packet is not evenly divisible by the
90khz clock, we were loosing a fraction of a tick per audio packet. This
causes every packet to be tagged with a timestamp that is a little early
and eventually a gap must be filled to maintain sync.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4574
b64f7644-9d1e-0410-96f1-
a4d463321fa5
int pos = 0;
int loop_limit = 256;
- if ( pts != -1 )
+ // If we are givn a pts, use it.
+ // But don't loose partial ticks.
+ if ( pts != -1 && (int64_t)pv->pts_next != pts )
pv->pts_next = pts;
while ( pos < size )
{