diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-11-04 20:17:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-04 20:17:41 +0000 |
| commit | ec245dce9074bd4fa64f1252f62d355e9185696c (patch) | |
| tree | 97f9fe31f10d42e167f6502bc1227a3006fec912 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | f06e4826c764c1214478a741b0f93315a8bba76b (diff) | |
| parent | ad262fe8a65137b1678508435054be50b053f217 (diff) | |
Merge branch 'master' into NetworkPR2
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 996b1b5c1..33256e4bf 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2675,9 +2675,10 @@ namespace MediaBrowser.Controller.MediaEncoding state.MediaSource = mediaSource; var request = state.BaseRequest; - if (!string.IsNullOrWhiteSpace(request.AudioCodec)) + var supportedAudioCodecs = state.SupportedAudioCodecs; + if (request != null && supportedAudioCodecs != null && supportedAudioCodecs.Length > 0) { - var supportedAudioCodecsList = request.AudioCodec.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + var supportedAudioCodecsList = supportedAudioCodecs.ToList(); ShiftAudioCodecsIfNeeded(supportedAudioCodecsList, state.AudioStream); |
