mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 05:43:50 +02:00
Fix disabled Matroska tracks crashing demuxer (closes #276)
This commit is contained in:
@@ -1012,6 +1012,11 @@ export class MatroskaDemuxer extends Demuxer {
|
|||||||
|
|
||||||
this.readContiguousElements(slice.slice(dataStartPos, size));
|
this.readContiguousElements(slice.slice(dataStartPos, size));
|
||||||
|
|
||||||
|
// Check if track was disabled during parsing (e.g., by FlagEnabled being 0)
|
||||||
|
if (!this.currentTrack) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.currentTrack.decodingInstructions.some((instruction) => {
|
if (this.currentTrack.decodingInstructions.some((instruction) => {
|
||||||
return instruction.data?.type !== 'decompress'
|
return instruction.data?.type !== 'decompress'
|
||||||
|| instruction.scope !== ContentEncodingScope.Block
|
|| instruction.scope !== ContentEncodingScope.Block
|
||||||
|
|||||||
Reference in New Issue
Block a user