Fix some bugs & polish edge cases

This commit is contained in:
Vanilagy
2026-05-11 23:50:06 +02:00
parent d8c8606341
commit 81531cc510
8 changed files with 92 additions and 28 deletions
+3 -2
View File
@@ -1245,8 +1245,9 @@ export class VideoSample implements Disposable {
? [this.squarePixelWidth, this.squarePixelHeight]
: [this.squarePixelHeight, this.squarePixelWidth];
if (options.crop) {
clampCropRectangle(options.crop, rotatedWidth, rotatedHeight);
let finalCrop = options.crop;
if (finalCrop) {
finalCrop = clampCropRectangle(finalCrop, rotatedWidth, rotatedHeight);
}
// These variables specify where the final sample will be drawn on the canvas