Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: use view-aware byte extraction for BufferSource inputs

Matthew Hrehirchuk2712d8a41b86
diff --git a/src/lib/exporter/streamingDecoder.ts b/src/lib/exporter/streamingDecoder.ts
index 9786fe08d..ee675763a 100644
--- a/src/lib/exporter/streamingDecoder.ts
+++ b/src/lib/exporter/streamingDecoder.ts
@@ -16,9 +16,10 @@ function buildAV1CodecString(description?: BufferSource): string {
if (!description) return fallback;
- const bytes = new Uint8Array(
- description instanceof ArrayBuffer ? description : description.buffer,
- );
+ const bytes =
+ description instanceof ArrayBuffer
+ ? new Uint8Array(description)
+ : new Uint8Array(description.buffer, description.byteOffset, description.byteLength);
// AV1CodecConfigurationRecord layout (4+ bytes):
// Byte 0: marker (1) | version (7)