forked from j62/ctbrec
1
0
Fork 0

Spawn FFmpeg process only if playlist request was successful

This commit is contained in:
0xboobface 2020-05-10 13:16:47 +02:00
parent 2956098d2c
commit b820021aee
1 changed files with 2 additions and 1 deletions

View File

@ -81,10 +81,11 @@ public class MergedFfmpegHlsDownload extends AbstractHlsDownload {
super.startTime = Instant.now(); super.startTime = Instant.now();
splitRecStartTime = ZonedDateTime.now(); splitRecStartTime = ZonedDateTime.now();
String segments = getSegmentPlaylistUrl(model);
Files.createDirectories(targetFile.getParentFile().toPath()); Files.createDirectories(targetFile.getParentFile().toPath());
startFfmpegProcess(targetFile); startFfmpegProcess(targetFile);
String segments = getSegmentPlaylistUrl(model);
downloadSegments(segments, true); downloadSegments(segments, true);
ffmpegThread.join(); ffmpegThread.join();
} catch (ParseException e) { } catch (ParseException e) {