forked from j62/ctbrec
Fix NPE in internalStop
This commit is contained in:
parent
cd5172613e
commit
3c4ef05a48
|
@ -358,16 +358,18 @@ public class MergedFfmpegHlsDownload extends AbstractHlsDownload {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (ffmpeg != null) {
|
||||||
boolean waitFor = ffmpeg.waitFor(5, TimeUnit.MINUTES);
|
try {
|
||||||
if (!waitFor && ffmpeg.isAlive()) {
|
boolean waitFor = ffmpeg.waitFor(5, TimeUnit.MINUTES);
|
||||||
LOG.info("FFmpeg didn't terminate. Destroying the process with force!");
|
if (!waitFor && ffmpeg.isAlive()) {
|
||||||
ffmpeg.destroyForcibly();
|
LOG.info("FFmpeg didn't terminate. Destroying the process with force!");
|
||||||
ffmpeg = null;
|
ffmpeg.destroyForcibly();
|
||||||
|
ffmpeg = null;
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
LOG.error("Interrupted while waiting for FFmpeg to terminate");
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
|
||||||
LOG.error("Interrupted while waiting for FFmpeg to terminate");
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue