We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95bb3cd commit 57b08dcCopy full SHA for 57b08dc
.changeset/slow-walls-reply.md
@@ -0,0 +1,5 @@
1
+---
2
+'@webav/av-cliper': patch
3
4
+
5
+fix: decoder queue size maybe too large
packages/av-cliper/src/clips/mp4-clip.ts
@@ -685,11 +685,13 @@ class VideoFrameFinder {
685
686
#decoding = false;
687
#startDecode = async (dec: VideoDecoder) => {
688
- if (this.#decoding) return;
689
- this.#decoding = true;
+ if (this.#decoding || dec.decodeQueueSize > 600) return;
690
691
// 启动解码任务,然后重试
692
let endIdx = this.#videoDecCusorIdx + 1;
+ if (endIdx > this.samples.length) return;
693
694
+ this.#decoding = true;
695
// 该 GoP 时间区间有时间匹配,且未被删除的帧
696
let hasValidFrame = false;
697
for (; endIdx < this.samples.length; endIdx++) {
0 commit comments