ffmpegwasm / ffmpegwasm/ffmpeg.wasm

emscripten_sleep does not work becuase the native setTimeout is overwritten

オープン
#611 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
17.8k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

```
function setTimeout(timeout) {
Module["timeout"] = timeout;
}

function safeSetTimeout(func, timeout) {
return setTimeout(()=>{ // will call the wrong function
callUserCallback(func)
}
, timeout)
}
function _emscripten_sleep(ms) {
return Asyncify.handleSleep(wakeUp=>safeSetTimeout(wakeUp, ms))
}
```

Have this problem because I use emscripten_sleep in ffmpeg code. It's better to rename the `setTimeout` function to other name.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。