Fix paths of files that are supposed to be in the mc data dir (fixes #40)

This commit is contained in:
johni0702
2016-11-26 13:26:53 +01:00
parent e6a789d4f8
commit 00bcc9e65e
5 changed files with 27 additions and 6 deletions

View File

@@ -49,7 +49,8 @@ public class VideoWriter implements FrameConsumer<RGBFrame> {
System.out.println("Starting " + settings.getExportCommand() + " with args: " + commandArgs);
String[] cmdline = new CommandLine(executable).addArguments(commandArgs).toStrings();
process = new ProcessBuilder(cmdline).directory(outputFolder).start();
OutputStream exportLogOut = new TeeOutputStream(new FileOutputStream("export.log"), ffmpegLog);
File exportLogFile = new File(Minecraft.getMinecraft().mcDataDir, "export.log");
OutputStream exportLogOut = new TeeOutputStream(new FileOutputStream(exportLogFile), ffmpegLog);
new StreamPipe(process.getInputStream(), exportLogOut).start();
new StreamPipe(process.getErrorStream(), exportLogOut).start();
outputStream = process.getOutputStream();