diff --git a/android/src/main/kotlin/top/skychip/video_decode_plugin/VideoDecodePlugin.kt b/android/src/main/kotlin/top/skychip/video_decode_plugin/VideoDecodePlugin.kt index 5c4f58f..bba254b 100644 --- a/android/src/main/kotlin/top/skychip/video_decode_plugin/VideoDecodePlugin.kt +++ b/android/src/main/kotlin/top/skychip/video_decode_plugin/VideoDecodePlugin.kt @@ -85,7 +85,7 @@ class VideoDecodePlugin : FlutterPlugin, MethodCallHandler { try { val frameData = call.argument("frameData") ?: return result.error("INVALID_ARGS", "无效的帧数据", null) val frameType = call.argument("frameType") ?: 0 - val timestamp = call.argument("timestamp") ?: 0L + val timestamp = (call.argument("timestamp"))?.toLong() ?: 0L val frameSeq = call.argument("frameSeq") ?: 0 val refIFrameSeq = call.argument("refIFrameSeq") val success = decoder?.decodeFrame(frameData, frameType, timestamp, frameSeq, refIFrameSeq) ?: false