diff options
| author | Vasily <just.one.man@yandex.ru> | 2020-04-07 14:23:53 +0300 |
|---|---|---|
| committer | Vasily <just.one.man@yandex.ru> | 2020-04-07 14:23:53 +0300 |
| commit | 8e514f8d637f5e3037949b796453f4c18899912a (patch) | |
| tree | edfe454aae3060da8cac9b13d0f7da716c29fcb1 | |
| parent | 0cd7cd611e6118b8dac31cf3c6861509f2b33c56 (diff) | |
Fix check for profile supporting a codec - it should first check if profile is talking about media type
For example, audio-only profiles have "VideoCodec" set to "null" which translates to "any codec", which breaks some logic later on
| -rw-r--r-- | MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index a5947bbf49..b43f8633ec 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -25,12 +25,12 @@ namespace MediaBrowser.Model.Dlna public bool SupportsVideoCodec(string codec) { - return ContainerProfile.ContainsContainer(VideoCodec, codec); + return Type == DlnaProfileType.Video && ContainerProfile.ContainsContainer(VideoCodec, codec); } public bool SupportsAudioCodec(string codec) { - return ContainerProfile.ContainsContainer(AudioCodec, codec); + return (Type == DlnaProfileType.Audio || Type == DlnaProfileType.Video) && ContainerProfile.ContainsContainer(AudioCodec, codec); } } } |
