flutter ffmpeg_kit_flutter ResultHandler 无法在空事件接收器上发送事件

flutter ffmpeg_kit_flutter ResultHandler can not send event on a null event sink

在我的个人项目中,我从任何使用 ffmpeg_kit_flutter 包的包中得到同样的错误,我确信这与 ffmpeg 有关。

 D/ffmpeg-kit-flutter( 4235): FFmpegKitFlutterPlugin started listening to events on 
io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@dde1f1b.

I/flutter ( 4235): Loaded ffmpeg-kit-flutter-android-https-x86-4.5.0-lts.
W/ffmpeg-kit-flutter( 4235): ResultHandler can not send event {FFmpegKitExecuteCallbackEvent=
{createTime=1638730375609, startTime=1638730375618, sessionId=1, type=1, command=
-ss 0:00:00.000000 -i /data/user/0/com.sm.smofficial/cache/file_picker/VID_20211102_030320.mp4
 -t 0:00:10.000000 -avoid_negative_ts make_zero -c:a copy -c:v copy /data/user/0/com.sm.smofficia
l/app_flutter/Trimmer/VID_20211102_030320_trimmed:Dec5,2021-13:52:55.mp4}} on a null event sink.

根据文档,没有特殊配置,我只是把这段代码放在manifest里

<uses-sdk tools:overrideLibrary="com.arthenica.ffmpegkit.flutter, com.arthenica.ffmpegkit" />

尝试将 pubspec.yaml 中的依赖项更改为:

  ffmpeg_kit_flutter:
    git:
      url: https://github.com/shilangyu/ffmpeg-kit
      ref: development-flutter
      path: prebuilt/bundle-flutter-lts/default

这将使您进入最新的 development-flutter 分支。如果您使用的是 FirebaseMessaging,这应该可以解决它。这对我有用。在这里阅读更多:https://github.com/tanersener/ffmpeg-kit/issues/209