mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Fix retranscoding of odd resolution
This commit is contained in:
parent
c0a9de6652
commit
f30ef8cf98
2 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue