Fix if PRE_FFMPEG_ARG was missing

This commit is contained in:
Jafea7 2025-08-31 18:00:45 +10:00
parent 48de109961
commit 180bfe72c2
1 changed files with 4 additions and 3 deletions

View File

@ -77,7 +77,8 @@ public class Remux extends AbstractPostProcessor {
} }
private String[] prepareCommandline(File inputFile, File remuxedFile) throws IOException { private String[] prepareCommandline(File inputFile, File remuxedFile) throws IOException {
String[] argsPreFfmpeg = getConfig().get(PRE_FFMPEG_ARGS).isEmpty() String preArgs = getConfig().getOrDefault(PRE_FFMPEG_ARGS, "");
String[] argsPreFfmpeg = preArgs.isEmpty()
? new String[] {} // If empty, create an empty array ? new String[] {} // If empty, create an empty array
: getConfig().get(PRE_FFMPEG_ARGS).split(" "); : getConfig().get(PRE_FFMPEG_ARGS).split(" ");
String[] args = getConfig().get(FFMPEG_ARGS).split(" "); String[] args = getConfig().get(FFMPEG_ARGS).split(" ");