aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2014-01-25 16:12:51 -0500
committerEric Reed <ebr@mediabrowser3.com>2014-01-25 16:12:51 -0500
commit19e73fc7e611b6a1c08298bbafcd7cab4d61e9e5 (patch)
treee5752768cfca1687feba1f25fd1a437e0e67839b /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent2c4c19cd9f7742fb292f18a5aaf6956cd5f6cd40 (diff)
parentd69f3a00af79fab446c46682aa462e3b10bf39f8 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 76cce0d66..67f06c792 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -536,7 +536,11 @@ namespace MediaBrowser.Api.Playback
Directory.CreateDirectory(parentPath);
- var task = MediaEncoder.ExtractTextSubtitle(inputPath, type, state.SubtitleStream.Index, path, CancellationToken.None);
+ // Don't re-encode ass/ssa to ass because ffmpeg ass encoder fails if there's more than one ass rectangle. Affect Anime mostly.
+ // See https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2013-April/063616.html
+ bool isAssSubtitle = string.Equals(state.SubtitleStream.Codec, "ass", StringComparison.OrdinalIgnoreCase) || string.Equals(state.SubtitleStream.Codec, "ssa", StringComparison.OrdinalIgnoreCase);
+
+ var task = MediaEncoder.ExtractTextSubtitle(inputPath, type, state.SubtitleStream.Index, isAssSubtitle, path, CancellationToken.None);
Task.WaitAll(task);
}