From 3edf91ce564266e43a96c89edb71887096e8d296 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 5 Jan 2017 23:38:03 -0500 Subject: update music artists --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs') diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 1ad4720386..0e0a22c392 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -2710,7 +2710,12 @@ namespace MediaBrowser.Api.Playback { if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1) { - inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + stream.Codec; + var decoder = GetDecoderFromCodec(stream.Codec); + + if (!string.IsNullOrWhiteSpace(decoder)) + { + inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + decoder; + } } } } @@ -2730,6 +2735,16 @@ namespace MediaBrowser.Api.Playback return inputModifier; } + private string GetDecoderFromCodec(string codec) + { + if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + + return codec; + } + /// /// Infers the audio codec based on the url /// -- cgit v1.2.3