Delete FFmpeg log files on JVM termination
This commit is contained in:
parent
8179fa0b8b
commit
8cc6f7ae0e
|
@ -72,6 +72,7 @@ public class FFmpegDownload extends AbstractHlsDownload {
|
|||
ffmpeg = Runtime.getRuntime().exec(cmdline, new String[0], targetFile.getParentFile());
|
||||
int exitCode = 1;
|
||||
File ffmpegLog = File.createTempFile(targetFile.getName(), ".log");
|
||||
ffmpegLog.deleteOnExit();
|
||||
try (FileOutputStream mergeLogStream = new FileOutputStream(ffmpegLog)) {
|
||||
Thread stdout = new Thread(new StreamRedirectThread(ffmpeg.getInputStream(), mergeLogStream));
|
||||
Thread stderr = new Thread(new StreamRedirectThread(ffmpeg.getErrorStream(), mergeLogStream));
|
||||
|
|
Loading…
Reference in New Issue