Make ADTS demuxer spit out ADTS packets instead of AAC, make ADTS muxer accept both AAC and ADTS input

This commit is contained in:
Vanilagy
2026-01-14 13:52:46 +01:00
parent 06ab9c8433
commit 045df3b9a5
6 changed files with 242 additions and 61 deletions
+3 -6
View File
@@ -993,12 +993,9 @@ export const validateAudioChunkMetadata = (metadata: EncodedAudioChunkMetadata |
);
}
if (!metadata.decoderConfig.description) {
throw new TypeError(
'Audio chunk metadata decoder configuration for AAC must include a description, which is expected to be'
+ ' an AudioSpecificConfig as specified in ISO 14496-3.',
);
}
// `description` may or may not be set, depending on if the format is AAC or ADTS, so don't perform any
// validation for it.
// https://www.w3.org/TR/webcodecs-aac-codec-registration
} else if (metadata.decoderConfig.codec.startsWith('mp3') || metadata.decoderConfig.codec.startsWith('mp4a')) {
// MP3-specific validation