qtmux: Allow up to 1 trak timescale unit of lateness in prefill mode
authorVivia Nikolaidou <vivia@ahiru.eu>
Wed, 12 Sep 2018 14:24:00 +0000 (17:24 +0300)
committerVivia Nikolaidou <vivia@ahiru.eu>
Thu, 13 Sep 2018 10:51:18 +0000 (13:51 +0300)
commit94f8603411d607aa125f31d48786c8bbf10eab25
tree2637853d47d220a1eb70ddc6563f0197c8f57b0b
parent43c5db3c7288f628d0ec44619fc6b2595b993279
qtmux: Allow up to 1 trak timescale unit of lateness in prefill mode

For 59.94 FPS, it's common to set 60000 as timescale. For that
timescale, if the audio is late by as little as 0:00:00.000016666
(definitely less than one audio sample), lateness gets rounded to 1.
Added a safeguard that allows lateness up to 1 sample with the specific
trak's timescale, to make sure that values less than e.g. one audio
sample won't break the prefill mode. What will happen in this case is
that the audio will get squeezed back to the video's timestamp, which in
practice means that the audio will be 0.000016666 seconds early (with
the patch).

https://bugzilla.gnome.org/show_bug.cgi?id=797133
gst/isomp4/gstqtmux.c