aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/StreamBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Dlna/StreamBuilder.cs')
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs23
1 files changed, 13 insertions, 10 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index e0cc1b705..43534efda 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -725,7 +725,7 @@ namespace MediaBrowser.Model.Dlna
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, SubtitleProfile[] subtitleProfiles, EncodingContext context, PlayMethod playMethod)
{
- if (playMethod != PlayMethod.Transcode)
+ if (playMethod != PlayMethod.Transcode && !subtitleStream.IsExternal)
{
// Look for supported embedded subs
foreach (SubtitleProfile profile in subtitleProfiles)
@@ -749,24 +749,27 @@ namespace MediaBrowser.Model.Dlna
// Look for an external profile that matches the stream type (text/graphical)
foreach (SubtitleProfile profile in subtitleProfiles)
- {
- bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format);
+ {
+ if (profile.Method != SubtitleDeliveryMethod.External)
+ {
+ continue;
+ }
if (!profile.SupportsLanguage(subtitleStream.Language))
{
continue;
}
- if (profile.Method == SubtitleDeliveryMethod.External && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
+ if (subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
{
- if (!requiresConversion)
- {
- return profile;
- }
+ bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format);
- if (subtitleStream.SupportsExternalStream)
+ if (subtitleStream.IsTextSubtitleStream || !requiresConversion)
{
- return profile;
+ if (subtitleStream.SupportsExternalStream)
+ {
+ return profile;
+ }
}
// For sync we can handle the longer extraction times