mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 04:13:51 +02:00
Add test for Annex B to length-prefixed conversion
This commit is contained in:
@@ -212,17 +212,6 @@ export const concatNalUnitsInLengthPrefixed = (nalUnits: Uint8Array[], lengthSiz
|
||||
return result;
|
||||
};
|
||||
|
||||
/** Converts an AVC packet in Annex B format to length-prefixed format. */
|
||||
export const transformAnnexBToLengthPrefixed = (packetData: Uint8Array) => {
|
||||
const nalUnits = findNalUnitsInAnnexB(packetData);
|
||||
if (nalUnits.length === 0) {
|
||||
// It's not valid Annex B data
|
||||
return null;
|
||||
}
|
||||
|
||||
return concatNalUnitsInLengthPrefixed(nalUnits, 4);
|
||||
};
|
||||
|
||||
// Data specified in ISO 14496-15
|
||||
export type AvcDecoderConfigurationRecord = {
|
||||
configurationVersion: number;
|
||||
|
||||
Reference in New Issue
Block a user