Try to terminate FFmpeg before killing it
This commit is contained in:
parent
d7d3e2944b
commit
f0713b96f5
|
@ -412,10 +412,13 @@ public class MergedFfmpegHlsDownload extends AbstractHlsDownload {
|
|||
try {
|
||||
boolean waitFor = ffmpeg.waitFor(45, TimeUnit.SECONDS);
|
||||
if (!waitFor && ffmpeg.isAlive()) {
|
||||
ffmpeg.destroy();
|
||||
if (ffmpeg.isAlive()) {
|
||||
LOG.info("FFmpeg didn't terminate. Destroying the process with force!");
|
||||
ffmpeg.destroyForcibly();
|
||||
ffmpeg = null;
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
LOG.error("Interrupted while waiting for FFmpeg to terminate");
|
||||
Thread.currentThread().interrupt();
|
||||
|
|
Loading…
Reference in New Issue