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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

4
Cargo.lock generated
View File

@ -3037,8 +3037,8 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hwcodec"
version = "0.4.12"
source = "git+https://github.com/21pages/hwcodec#6fbafe7dd25adad5e897b3192b2b40b720a9b118"
version = "0.4.13"
source = "git+https://github.com/21pages/hwcodec#29f52366c274f55b74cca7e84fb33aa00f2b63a7"
dependencies = [
"bindgen 0.59.2",
"cc",

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;