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();
splitRecStartTime = ZonedDateTime.now();
String segments = getSegmentPlaylistUrl(model);
Files.createDirectories(targetFile.getParentFile().toPath());
startFfmpegProcess(targetFile);
String segments = getSegmentPlaylistUrl(model);
downloadSegments(segments, true);
ffmpegThread.join();
} catch (ParseException e) {