order streams by index before picking the one we want
This commit is contained in:
parent
697e98426f
commit
0cabe8808e
|
@ -211,7 +211,7 @@ namespace MediaBrowser.Api.Playback
|
|||
/// <returns>MediaStream.</returns>
|
||||
private MediaStream GetMediaStream(IEnumerable<MediaStream> allStream, int? desiredIndex, MediaStreamType type, bool returnFirstIfNoIndex = true)
|
||||
{
|
||||
var streams = allStream.Where(s => s.Type == type).ToList();
|
||||
var streams = allStream.Where(s => s.Type == type).OrderBy(i => i.Index).ToList();
|
||||
|
||||
if (desiredIndex.HasValue)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user