The Free Software Media System - Server Backend & API
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
Vasily8e514f8d637f
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.csindex a5947bbf49..b43f8633ec 100644--- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs+++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs@@ -25,12 +25,12 @@ namespace MediaBrowser.Model.Dlnapublic 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);}}}