[vlc-commits] macosx: escape sout filenames (fix #19841)
Francois Cartegnie
git at videolan.org
Tue Feb 27 02:30:04 CET 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 26 13:24:51 2018 +0100| [42cf4bbc2909ade086da04a9d2132025cc275505] | committer: Marvin Scholz
macosx: escape sout filenames (fix #19841)
(cherry picked from commit 82547ae9b1d3128b496697893f5ccf947d15b3d0)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=42cf4bbc2909ade086da04a9d2132025cc275505
---
modules/gui/macosx/VLCOutput.m | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/VLCOutput.m b/modules/gui/macosx/VLCOutput.m
index 68bb3ce9a4..81d6ad2d6d 100644
--- a/modules/gui/macosx/VLCOutput.m
+++ b/modules/gui/macosx/VLCOutput.m
@@ -295,17 +295,20 @@
else if ([mux isEqualToString: @"Raw"]) mux_string = @"raw";
else mux_string = @"ts";
+ NSString *filename_string =
+ [[self.fileTextField stringValue] stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
+
if ([mode isEqualToString: _NS("File")]) {
if ([self.dumpCheckbox state] == NSOnState) {
_soutMRL = [NSArray arrayWithObjects:@":demux=dump",
[NSString stringWithFormat:
- @":demuxdump-file=%@",
- [self.fileTextField stringValue]], nil];
+ @":demuxdump-file=\"%@\"",
+ filename_string], nil];
return;
} else
[mrl_string appendFormat:@"standard{mux=%@,access=file{no-overwrite},dst=\"%@\"}",
mux_string,
- [self.fileTextField stringValue]];
+ filename_string];
}
else if ([mode isEqualToString: _NS("Stream")]) {
mode = [self.streamTypePopup titleOfSelectedItem];
More information about the vlc-commits
mailing list