diff --git a/lib/plugin/pl_player/widgets/mpv_convert_webp.dart b/lib/plugin/pl_player/widgets/mpv_convert_webp.dart index 10d15132..3cdade3d 100644 --- a/lib/plugin/pl_player/widgets/mpv_convert_webp.dart +++ b/lib/plugin/pl_player/widgets/mpv_convert_webp.dart @@ -117,8 +117,18 @@ class MpvConvertWebp { } } - void _command(List args) => - NativePlayer.statiCommand(args, _mpv, _ctx); + void _command(List args) { + final pointers = args.map((e) => e.toNativeUtf8()).toList(); + final arr = calloc>(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(); diff --git a/pubspec.lock b/pubspec.lock index 8b008c19..da99bcb1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1145,8 +1145,8 @@ packages: description: path: media_kit ref: "version_1.2.5" - resolved-ref: "4d68e69281b44f2c8e3c444cca3d8d8dc6dcff88" - url: "https://github.com/My-Responsitories/media-kit.git" + resolved-ref: "43aee19d9b2b0e33e0c9dd922b36ca6ace56de29" + url: "https://github.com/bggRGjQaUbCoE/media-kit.git" source: git version: "1.1.11" media_kit_libs_android_video: @@ -1192,13 +1192,14 @@ packages: source: git version: "1.0.5" media_kit_libs_windows_video: - dependency: transitive + dependency: "direct overridden" description: - name: media_kit_libs_windows_video - sha256: dff76da2778729ab650229e6b4ec6ec111eb5151431002cbd7ea304ff1f112ab - url: "https://pub.dev" - source: hosted - version: "1.0.11" + path: "libs/windows/media_kit_libs_windows_video" + ref: "version_1.2.5" + resolved-ref: "43aee19d9b2b0e33e0c9dd922b36ca6ace56de29" + url: "https://github.com/bggRGjQaUbCoE/media-kit.git" + source: git + version: "1.0.10" media_kit_native_event_loop: dependency: "direct overridden" description: diff --git a/pubspec.yaml b/pubspec.yaml index b0b27351..fcf56080 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -241,7 +241,7 @@ dependency_overrides: rxdart: ^0.28.0 media_kit: git: - url: https://github.com/My-Responsitories/media-kit.git + url: https://github.com/bggRGjQaUbCoE/media-kit.git path: media_kit ref: version_1.2.5 media_kit_video: @@ -264,6 +264,11 @@ dependency_overrides: url: https://github.com/bggRGjQaUbCoE/media-kit.git path: libs/android/media_kit_libs_android_video ref: version_1.2.5 + media_kit_libs_windows_video: + git: + url: https://github.com/bggRGjQaUbCoE/media-kit.git + path: libs/windows/media_kit_libs_windows_video + ref: version_1.2.5 font_awesome_flutter: 10.9.0 dev_dependencies: