From 8308528e6ccb834e5fabe1ea1de7e2aa43265783 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 7 Apr 2013 17:05:27 -0400 Subject: [PATCH] fix for #114 - Server returns incorrect audio stream. --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index a1c32dc636..60c2a7f50f 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -693,9 +693,13 @@ namespace MediaBrowser.Api.Playback state.VideoStream = GetMediaStream(media.MediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video, true); state.SubtitleStream = GetMediaStream(media.MediaStreams, videoRequest.SubtitleStreamIndex, MediaStreamType.Subtitle, false); + state.AudioStream = GetMediaStream(media.MediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio, true); + } + else + { + state.AudioStream = GetMediaStream(media.MediaStreams, null, MediaStreamType.Audio, true); } - state.AudioStream = GetMediaStream(media.MediaStreams, null, MediaStreamType.Audio, true); return state; }