mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Apply suggestions from code review
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
4b1256e67b
commit
5386f06095
@ -776,9 +776,8 @@ namespace MediaBrowser.Model.Dlna
|
|||||||
if (directVideoCodec != null)
|
if (directVideoCodec != null)
|
||||||
{
|
{
|
||||||
// merge directVideoCodec to videoCodecs
|
// merge directVideoCodec to videoCodecs
|
||||||
videoCodecs = videoCodecs != null && videoCodecs.Length > 0
|
Array.Resize(ref videoCodecs, (videoCodecs?.Length ?? 0) + 1);
|
||||||
? videoCodecs.Union(new[] { directVideoCodec }).ToArray()
|
videoCodecs[^1] = directVideoCodec;
|
||||||
: new[] { directVideoCodec };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playlistItem.VideoCodecs = videoCodecs;
|
playlistItem.VideoCodecs = videoCodecs;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user