Fix subtitle extraction when input path contains quotes

This commit is contained in:
Dmitry Lyzo 2024-09-03 22:57:01 +03:00
parent b3efae71c0
commit 9e4befa52e

View File

@ -501,11 +501,11 @@ namespace MediaBrowser.MediaEncoding.Subtitles
List<MediaStream> subtitleStreams,
CancellationToken cancellationToken)
{
var inputPath = mediaSource.Path;
var inputPath = _mediaEncoder.GetInputArgument(mediaSource.Path, mediaSource);
var outputPaths = new List<string>();
var args = string.Format(
CultureInfo.InvariantCulture,
"-i \"{0}\" -copyts",
"-i {0} -copyts",
inputPath);
foreach (var subtitleStream in subtitleStreams)
@ -676,7 +676,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
var processArgs = string.Format(
CultureInfo.InvariantCulture,
"-i \"{0}\" -copyts -map 0:{1} -an -vn -c:s {2} \"{3}\"",
"-i {0} -copyts -map 0:{1} -an -vn -c:s {2} \"{3}\"",
inputPath,
subtitleStreamIndex,
outputCodec,