Skip to content

Commit

Permalink
Fix box name extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Dec 1, 2022
1 parent 7e3edce commit 93b6075
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions externs/shaka/mp4_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @typedef {{
* name: string,
* parser: !shaka.util.Mp4Parser,
* partialOkay: boolean,
* start: number,
Expand All @@ -21,6 +22,8 @@
* has64BitSize: boolean
* }}
*
* @property {string} name
* The box name, a 4-character string (fourcc).
* @property {!shaka.util.Mp4Parser} parser
* The parser that parsed this box. The parser can be used to parse child
* boxes where the configuration of the current parser is needed to parsed
Expand Down
2 changes: 1 addition & 1 deletion lib/cea/mp4_cea_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ shaka.cea.Mp4CeaParser = class {
const trackIds = [];
const timescales = [];

const codecBoxParser = (box) => this.setBitstreamFormat_(box.type);
const codecBoxParser = (box) => this.setBitstreamFormat_(box.name);

new Mp4Parser()
.box('moov', Mp4Parser.children)
Expand Down
1 change: 1 addition & 0 deletions lib/util/mp4_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ shaka.util.Mp4Parser = class {

/** @type {shaka.extern.ParsedBox} */
const box = {
name,
parser: this,
partialOkay: partialOkay || false,
version,
Expand Down

0 comments on commit 93b6075

Please sign in to comment.