Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
qq15725 committed Dec 21, 2024
1 parent 874b15c commit a2a86c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/transformers/Mp4EncodeTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class Mp4EncodeTransformer implements ReadableWritablePair<Mp4EncodeTrans
protected _audioEncoder = new AudioEncoder({
error: error => console.error('Failed to AudioEncoder', error),
output: (chunk, meta) => {
this._rsControler?.enqueue({ type: 'audio', chunk, meta })
if (meta) {
this._rsControler?.enqueue({ type: 'audio', chunk, meta })
}
this._updateProgress()
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/Mp4MuxTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class Mp4MuxTransformer implements ReadableWritablePair<ArrayBuffer, Mp4M
// eslint-disable-next-line new-cap
const esdsBox = new BoxParser.esdsBox(buf.byteLength)
;(esdsBox as any).hdr_size = 0
esdsBox.parse(new DataStream(buf, 0, DataStream.BIG_ENDIAN))
esdsBox.parse(new DataStream(buf.buffer, 0, DataStream.BIG_ENDIAN))
return esdsBox
}

Expand Down

0 comments on commit a2a86c9

Please sign in to comment.