mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Fix incorrect VideoSample dimensions
This commit is contained in:
+5
-2
@@ -143,8 +143,11 @@ export class VideoSample {
|
||||
this._data = data;
|
||||
|
||||
this.format = data.format;
|
||||
this.codedWidth = data.codedWidth;
|
||||
this.codedHeight = data.codedHeight;
|
||||
// Copying the display dimensions here, assuming no innate VideoFrame rotation
|
||||
this.codedWidth = data.displayWidth;
|
||||
this.codedHeight = data.displayHeight;
|
||||
// The VideoFrame's rotation is ignored here. It's still a new field, and I'm not sure of any application
|
||||
// where the browser makes use of it. If a case gets found, I'll add it.
|
||||
this.rotation = init?.rotation ?? 0;
|
||||
this.timestamp = init?.timestamp ?? data.timestamp / 1e6;
|
||||
this.duration = init?.duration ?? (data.duration ?? 0) / 1e6;
|
||||
|
||||
+1
-1
@@ -491,7 +491,7 @@ export class FilePathSource extends Source {
|
||||
this._streamSource = new StreamSource({
|
||||
getSize: async () => {
|
||||
const FS_MODULE_NAME = 'node:fs/promises';
|
||||
const fs = await import(FS_MODULE_NAME) as typeof import('node:fs/promises');
|
||||
const fs = await import(/* @vite-ignore */ FS_MODULE_NAME) as typeof import('node:fs/promises');
|
||||
fileHandle = await fs.open(filePath, 'r');
|
||||
|
||||
const stats = await fileHandle.stat();
|
||||
|
||||
Reference in New Issue
Block a user