forked from j62/ctbrec
Add -- to player command line
... to separate the command line args from the file name. Some recordings can start with '-' , which would be interpreted as argument otherwise.
This commit is contained in:
parent
04bfd9805d
commit
f285d2ba53
|
@ -163,8 +163,9 @@ public class Player {
|
|||
private String[] createCmdline(String mediaSource) {
|
||||
Config cfg = Config.getInstance();
|
||||
String[] playerArgs = cfg.getSettings().mediaPlayerParams.trim().split(" ");
|
||||
String[] cmdline = new String[playerArgs.length + 2];
|
||||
String[] cmdline = new String[playerArgs.length + 3];
|
||||
cmdline[0] = cfg.getSettings().mediaPlayer;
|
||||
cmdline[cmdline.length - 2] = "--";
|
||||
cmdline[cmdline.length - 1] = mediaSource;
|
||||
System.arraycopy(playerArgs, 0, cmdline, 1, playerArgs.length);
|
||||
return cmdline;
|
||||
|
|
Loading…
Reference in New Issue