mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-24 07:30:57 +01:00
update character escaping
This commit is contained in:
parent
0e9cd51f9c
commit
635c8d50a3
5 changed files with 52 additions and 14 deletions
|
|
@ -88,8 +88,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
private readonly int DefaultImageExtractionTimeoutMs;
|
||||
private readonly bool EnableEncoderFontFile;
|
||||
|
||||
public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, string ffMpegPath, string ffProbePath, bool hasExternalEncoder, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ILiveTvManager liveTvManager, IIsoManager isoManager, ILibraryManager libraryManager, IChannelManager channelManager, ISessionManager sessionManager, Func<ISubtitleEncoder> subtitleEncoder, Func<IMediaSourceManager> mediaSourceManager, IHttpClient httpClient, IZipClient zipClient, IMemoryStreamFactory memoryStreamProvider, IProcessFactory processFactory,
|
||||
int defaultImageExtractionTimeoutMs,
|
||||
public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, string ffMpegPath, string ffProbePath, bool hasExternalEncoder, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ILiveTvManager liveTvManager, IIsoManager isoManager, ILibraryManager libraryManager, IChannelManager channelManager, ISessionManager sessionManager, Func<ISubtitleEncoder> subtitleEncoder, Func<IMediaSourceManager> mediaSourceManager, IHttpClient httpClient, IZipClient zipClient, IMemoryStreamFactory memoryStreamProvider, IProcessFactory processFactory,
|
||||
int defaultImageExtractionTimeoutMs,
|
||||
bool enableEncoderFontFile)
|
||||
{
|
||||
_logger = logger;
|
||||
|
|
@ -459,7 +459,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
if (request.AnalyzeDurationSections > 0)
|
||||
{
|
||||
analyzeDuration = "-analyzeduration " +
|
||||
(request.AnalyzeDurationSections*1000000).ToString(CultureInfo.InvariantCulture);
|
||||
(request.AnalyzeDurationSections * 1000000).ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1221,9 +1221,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
// https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
|
||||
// We need to double escape
|
||||
|
||||
var escapeChars = new[] {':', '\'', ','};
|
||||
|
||||
return path.Replace('\\', '/').Replace(":/", "\\:/").Replace("'", "'\\\\\\''");
|
||||
return path.Replace('\\', '/').Replace(":", "\\:").Replace("'", "'\\\\\\''");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue