Skip to content

Commit 7e827ac

Browse files
authored
fix: Read TRUN data_offset as signed int (#8383)
From ISO/IEC 14496-12 ``` aligned(8) class TrackRunBox extends FullBox('trun', version, tr_flags) { unsigned int(32) sample_count; // the following are optional fields signed int(32) data_offset; unsigned int(32) first_sample_flags; // all fields in the following array are optional { unsigned int(32) sample_duration; unsigned int(32) sample_size; unsigned int(32) sample_flags if (version == 0) { unsigned int(32) sample_composition_time_offset; } else { signed int(32) sample_composition_time_offset; } }[ sample_count ] } ```
1 parent 5597c06 commit 7e827ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/mp4_box_parsers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ shaka.util.Mp4BoxParsers = class {
186186

187187
// "data_offset"
188188
if (flags & 0x000001) {
189-
dataOffset = reader.readUint32();
189+
dataOffset = reader.readInt32();
190190
}
191191

192192
// Skip "first_sample_flags" if present.

0 commit comments

Comments
 (0)