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