Commit 42cf4bbc authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Marvin Scholz

macosx: escape sout filenames (fix #19841)

(cherry picked from commit 82547ae9)
Signed-off-by: Marvin Scholz's avatarMarvin Scholz <>
parent 399713b5
...@@ -295,17 +295,20 @@ ...@@ -295,17 +295,20 @@
else if ([mux isEqualToString: @"Raw"]) mux_string = @"raw"; else if ([mux isEqualToString: @"Raw"]) mux_string = @"raw";
else mux_string = @"ts"; else mux_string = @"ts";
NSString *filename_string =
[[self.fileTextField stringValue] stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
if ([mode isEqualToString: _NS("File")]) { if ([mode isEqualToString: _NS("File")]) {
if ([self.dumpCheckbox state] == NSOnState) { if ([self.dumpCheckbox state] == NSOnState) {
_soutMRL = [NSArray arrayWithObjects:@":demux=dump", _soutMRL = [NSArray arrayWithObjects:@":demux=dump",
[NSString stringWithFormat: [NSString stringWithFormat:
@":demuxdump-file=%@", @":demuxdump-file=\"%@\"",
[self.fileTextField stringValue]], nil]; filename_string], nil];
return; return;
} else } else
[mrl_string appendFormat:@"standard{mux=%@,access=file{no-overwrite},dst=\"%@\"}", [mrl_string appendFormat:@"standard{mux=%@,access=file{no-overwrite},dst=\"%@\"}",
mux_string, mux_string,
[self.fileTextField stringValue]]; filename_string];
} }
else if ([mode isEqualToString: _NS("Stream")]) { else if ([mode isEqualToString: _NS("Stream")]) {
mode = [self.streamTypePopup titleOfSelectedItem]; mode = [self.streamTypePopup titleOfSelectedItem];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment