ffprobe returns -1 on success

This commit is contained in:
Manav Rathi
2025-04-29 16:37:27 +05:30
parent 64363b70e3
commit dabae19cf2

View File

@@ -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);
}
}