From f30ef8cf9888255a58d0d319b741ae27b456185e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Nov 2022 10:43:22 +0100 Subject: Fix retranscoding of odd resolution --- server/lib/transcoding/transcoding.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/lib/transcoding') diff --git a/server/lib/transcoding/transcoding.ts b/server/lib/transcoding/transcoding.ts index e6914db87..c7b61e9ba 100644 --- a/server/lib/transcoding/transcoding.ts +++ b/server/lib/transcoding/transcoding.ts @@ -444,7 +444,9 @@ async function generateHlsPlaylistCommon (options: { } function buildOriginalFileResolution (inputResolution: number) { - if (CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION === true) return toEven(inputResolution) + if (CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION === true) { + return toEven(inputResolution) + } const resolutions = computeResolutionsToTranscode({ input: inputResolution, @@ -455,7 +457,9 @@ function buildOriginalFileResolution (inputResolution: number) { hasAudio: true }) - if (resolutions.length === 0) return toEven(inputResolution) + if (resolutions.length === 0) { + return toEven(inputResolution) + } return Math.max(...resolutions) } -- cgit v1.2.3