diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-08 09:24:03 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-04-08 09:24:03 -0700 |
| commit | 48f22f96774d67e23b2603407ab41595e5dfae37 (patch) | |
| tree | 0981335cae0864a83415df357af857c6f92ba288 /MediaBrowser.Api/Playback | |
| parent | f64c7bb0c0702445a4dbcffdae55dcc36da6d931 (diff) | |
| parent | 389d0ec7fdb05259a2b808b6733a1977f482268c (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Api/Playback')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Progressive/VideoService.cs | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 612f731918..9787a7cd04 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -319,7 +319,7 @@ namespace MediaBrowser.Api.Playback { var param = string.Empty; - var isVc1 = state.VideoStream != null && + var isVc1 = state.VideoStream != null && string.Equals(state.VideoStream.Codec, "vc1", StringComparison.OrdinalIgnoreCase); var qualitySetting = GetQualitySetting(); @@ -438,9 +438,12 @@ namespace MediaBrowser.Api.Playback var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream); // Boost volume to 200% when downsampling from 6ch to 2ch - if (channels.HasValue && channels.Value <= 2 && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5) + if (channels.HasValue && channels.Value <= 2) { - volParam = ",volume=2.000000"; + if (state.AudioStream != null && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5) + { + volParam = ",volume=2.000000"; + } } if (state.Request.AudioSampleRate.HasValue) @@ -1625,7 +1628,7 @@ namespace MediaBrowser.Api.Playback return SupportsAutomaticVideoStreamCopy; } - + protected virtual bool SupportsAutomaticVideoStreamCopy { get diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index 855c036911..0d09854670 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -186,7 +186,7 @@ namespace MediaBrowser.Api.Playback.Progressive private string GetAudioArguments(StreamState state) { // If the video doesn't have an audio stream, return a default. - if (state.AudioStream == null) + if (state.AudioStream == null && state.HasMediaStreams) { return string.Empty; } |
