Skip to content

Commit

Permalink
fix(avutil): Uint8Array -> Uint8Array<ArrayBufferLike>
Browse files Browse the repository at this point in the history
zhaohappy committed Jan 23, 2025
1 parent 4d24f5a commit c0db345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avutil/util/avpacket.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ import SafeUint8Array from 'cheap/std/buffer/SafeUint8Array'

const AV_INPUT_BUFFER_PADDING_SIZE = 64

export function getAVPacketData(avpacket: pointer<AVPacket>): Uint8Array
export function getAVPacketData(avpacket: pointer<AVPacket>): Uint8Array<ArrayBufferLike>
export function getAVPacketData(avpacket: pointer<AVPacket>, safe: boolean): SafeUint8Array
export function getAVPacketData(avpacket: pointer<AVPacket>, safe?: boolean) {
return safe ? mapSafeUint8Array(avpacket.data, reinterpret_cast<size>(avpacket.size)) : mapUint8Array(avpacket.data, reinterpret_cast<size>(avpacket.size))

0 comments on commit c0db345

Please sign in to comment.