fix the bottom of FFmpeg vram qsv encoding being cropped (#8191)

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2024-05-29 13:34:22 +08:00
committed by GitHub
parent d2f119b85e
commit 837382349e
2 changed files with 7 additions and 4 deletions

View File

@@ -1737,7 +1737,10 @@ class PredefinedCursor {
_image?.dispose();
_image = await img.decodeImageFromPixels(
data, defaultImg.width, defaultImg.height, ui.PixelFormat.rgba8888);
if (_image == null) {
print("decodeImageFromPixels failed, pre-defined cursor $id");
return;
}
double scale = 1.0;
if (isWindows) {
data = _image2!.getBytes(order: img2.ChannelOrder.bgra);
@@ -2104,7 +2107,7 @@ class CursorModel with ChangeNotifier {
_x = -10000;
_x = -10000;
_image = null;
_images.clear();
disposeImages();
_clearCache();
_cache = null;