Skip to content

Commit

Permalink
fix: throw worker async exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverSc committed Aug 13, 2024
1 parent 8f4cf02 commit 5652607
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WEB_DEMUXER_ARGS = \
-O3 \
-s EXPORT_ES6=1 \
-s INVOKE_RUN=0 \
-s ENVIRONMENT=worker \
-s ENVIRONMENT=worker \
-s ASYNCIFY \
-s ALLOW_MEMORY_GROWTH=1

Expand Down
4 changes: 2 additions & 2 deletions src/ffmpeg.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ self.addEventListener("message", async function (e) {
try {
switch (type) {
case "LoadWASM":
return handleLoadWASM(data);
return await handleLoadWASM(data);
case "GetAVStream":
return handleGetAVStream(data, msgId);
case "GetAVStreams":
Expand All @@ -24,7 +24,7 @@ self.addEventListener("message", async function (e) {
case "GetAVPackets":
return handleGetAVPackets(data, msgId);
case "ReadAVPacket":
return handleReadAVPacket(data, msgId);
return await handleReadAVPacket(data, msgId);
case "SetAVLogLevel":
return handleSetAVLogLevel(data, msgId);
default:
Expand Down

0 comments on commit 5652607

Please sign in to comment.