From 2af8d2edb196e420ce06f71df60e058ecd302df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20=C5=A0ukurov?= <14295673+bloha@users.noreply.github.com> Date: Thu, 20 Jun 2019 13:17:30 +0300 Subject: [PATCH] Fix SAP type parsing --- javascript/mp4parser/mp4.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/mp4parser/mp4.js b/javascript/mp4parser/mp4.js index 6c747d9..96603fd 100644 --- a/javascript/mp4parser/mp4.js +++ b/javascript/mp4parser/mp4.js @@ -969,7 +969,7 @@ function box_sidx(data, offset, len) { entry['subsegment_duration'] = data.getUint32(x); x += 4; fourBytes = data.getUint32(x); x += 4; entry['starts_with_SAP'] = (fourBytes >> 31) & 1; - entry['SAP_type'] = (fourBytes >> 29) & 7; + entry['SAP_type'] = (fourBytes >> 28) & 7; entry['SAP_delta_time'] = (fourBytes & 0x0fffffff); boxContent.Entries.push(entry); }