[vlc-devel] [PATCH] Input clock reference: bump maximum gap to 60s

Rafaël Carré funman at videolan.org
Sat Aug 31 14:55:52 CEST 2013

Some APE files can have a single packet duration of up to 30s
Is there even a hard limit in this format, or can packets be longer?

Previous gap limit was an arbitrary 22s, written in a way reminiscent of
the MPEG 90kHz clock, which does not make sense anymore since reference clock
in all our demuxers use our own 1MHz clock.

Also explicitely use CLOCK_FREQ
 src/input/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/clock.c b/src/input/clock.c
index 7d8b1e1..1467345 100644
--- a/src/input/clock.c
+++ b/src/input/clock.c
@@ -80,7 +80,7 @@
 /* Maximum gap allowed between two CRs. */
-#define CR_MAX_GAP (INT64_C(2000000)*100/9)
+#define CR_MAX_GAP (60 * CLOCK_FREQ)
 /* Latency introduced on DVDs with CR == 0 on chapter change - this is from
  * my dice --Meuuh */

More information about the vlc-devel mailing list