diff options
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 1ad472038..0e0a22c39 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; + } + /// <summary> /// Infers the audio codec based on the url /// </summary> |
