fix encoding escape quotes

This commit is contained in:
Luke Pulverenti 2015-06-07 23:17:27 -04:00
parent a31cc81487
commit fb49edf055

View File

@ -902,13 +902,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
// TODO: Perhaps also use original_size=1920x800 ?? // TODO: Perhaps also use original_size=1920x800 ??
return string.Format("subtitles=filename='{0}'{1},setpts=PTS -{2}/TB", return string.Format("subtitles=filename='{0}'{1},setpts=PTS -{2}/TB",
subtitlePath.Replace('\\', '/').Replace(":/", "\\:/"), subtitlePath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
charsetParam, charsetParam,
seconds.ToString(UsCulture)); seconds.ToString(UsCulture));
} }
return string.Format("subtitles='{0}:si={1}',setpts=PTS -{2}/TB", return string.Format("subtitles='{0}:si={1}',setpts=PTS -{2}/TB",
state.MediaPath.Replace('\\', '/').Replace(":/", "\\:/"), state.MediaPath.Replace('\\', '/').Replace("'", "\\'").Replace(":/", "\\:/"),
state.InternalSubtitleStreamOffset.ToString(UsCulture), state.InternalSubtitleStreamOffset.ToString(UsCulture),
seconds.ToString(UsCulture)); seconds.ToString(UsCulture));
} }