upgrade windows mpv

Closes #1341

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-01 18:54:08 +08:00
parent ed9be72172
commit 0fd3f3ffd1
3 changed files with 27 additions and 11 deletions

View File

@@ -117,8 +117,18 @@ class MpvConvertWebp {
}
}
void _command(List<String> args) =>
NativePlayer.statiCommand(args, _mpv, _ctx);
void _command(List<String> args) {
final pointers = args.map((e) => e.toNativeUtf8()).toList();
final arr = calloc<Pointer<Uint8>>(128);
for (int i = 0; i < args.length; i++) {
arr[i] = pointers[i];
}
_mpv.mpv_command(_ctx, arr.cast());
calloc.free(arr);
pointers.forEach(calloc.free);
}
void _observeProperty(String property) {
final name = property.toNativeUtf8();