Call onExit in waitFor

This commit is contained in:
0xb00bface 2021-01-01 17:09:12 +01:00
parent d8288b31c6
commit a9d5888190
1 changed files with 7 additions and 1 deletions

View File

@ -106,7 +106,13 @@ public class FFmpeg {
}
public int waitFor() throws InterruptedException {
return process.waitFor();
int exitCode = process.waitFor();
try {
shutdown(exitCode);
} catch (IOException e) {
LOG.error("Error while shutting down FFmpeg process", e);
}
return exitCode;
}
public static class Builder {