From ad653434a6181fdfbcc549b9a9f7c3721d42318a Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:37:34 +0100 Subject: [PATCH] Small fix --- src/isobmff/isobmff-demuxer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/isobmff/isobmff-demuxer.ts b/src/isobmff/isobmff-demuxer.ts index d4d08d3..4161791 100644 --- a/src/isobmff/isobmff-demuxer.ts +++ b/src/isobmff/isobmff-demuxer.ts @@ -2263,7 +2263,7 @@ const getSampleInfo = (sampleTable: SampleTable, sampleIndex: number): SampleInf x => x.startIndex, ); const offsetEntry = sampleTable.sampleCompositionTimeOffsets[offsetEntryIndex]; - if (offsetEntry) { + if (offsetEntry && sampleIndex - offsetEntry.startIndex < offsetEntry.count) { presentationTimestamp += offsetEntry.offset; }