aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-01-27 23:23:19 -0500
committerGitHub <noreply@github.com>2017-01-27 23:23:19 -0500
commitfd93caf37f27c8e197af37b89960195ea023e7b1 (patch)
tree9f04111e31ecac922882e9353f108baa804198c9 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent90420a7c23712e982c9062bf7e14f65195c2a723 (diff)
parentf616aee90b1a27a573302740cfa17d420a2b6bc1 (diff)
Merge pull request #2428 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 120c00a14..c5ec78477 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -2704,21 +2704,25 @@ namespace MediaBrowser.Api.Playback
//inputModifier += " -noaccurate_seek";
}
- foreach (var stream in state.MediaSource.MediaStreams)
+ if (state.RunTimeTicks.HasValue)
{
- if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
+ foreach (var stream in state.MediaSource.MediaStreams)
{
- if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
+ if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
{
- var decoder = GetDecoderFromCodec(stream.Codec);
-
- if (!string.IsNullOrWhiteSpace(decoder))
+ if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
{
- inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder;
+ var decoder = GetDecoderFromCodec(stream.Codec);
+
+ if (!string.IsNullOrWhiteSpace(decoder))
+ {
+ inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder;
+ }
}
}
}
}
+
//var videoStream = state.VideoStream;
//if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
//{