Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

ffprobe returns -1 on success

Manav Rathidabae19cf276
diff --git a/web/packages/gallery/services/ffmpeg/web.ts b/web/packages/gallery/services/ffmpeg/web.ts
index aaa7b3bebf..f5065c2f61 100644
--- a/web/packages/gallery/services/ffmpeg/web.ts
+++ b/web/packages/gallery/services/ffmpeg/web.ts
@@ -204,7 +204,9 @@ const ffprobeOutput = async (
try {
status = await ffmpeg.ffprobe(cmd);
- if (status !== 0) {
+ // Currently, ffprobe incorrectly returns status -1 on success.
+ // https://github.com/ffmpegwasm/ffmpeg.wasm/issues/817
+ if (status !== 0 && status != -1) {
log.info(
`[wasm] ffprobe command failed with exit code ${status}: ${cmd.join(" ")}`,
);
@@ -221,7 +223,7 @@ const ffprobeOutput = async (
} catch (e) {
// Output file might not even exist if the command did not succeed,
// so only log on success.
- if (status === 0) {
+ if (status !== 0 && status != -1) {
log.error(`Failed to remove output ${outputPath}`, e);
}
}