mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Fix "height not divisible by 2" ffmpeg error
This commit is contained in:
parent
5982ffc4b5
commit
318b0bd0c2
3 changed files with 31 additions and 8 deletions
|
@ -243,6 +243,18 @@ function execShell (command: string, options?: ExecOptions) {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function isOdd (num: number) {
|
||||
return (num % 2) !== 0
|
||||
}
|
||||
|
||||
function toEven (num: number) {
|
||||
if (isOdd) return num + 1
|
||||
|
||||
return num
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function promisify0<A> (func: (cb: (err: any, result: A) => void) => void): () => Promise<A> {
|
||||
return function promisified (): Promise<A> {
|
||||
return new Promise<A>((resolve: (arg: A) => void, reject: (err: any) => void) => {
|
||||
|
@ -310,5 +322,8 @@ export {
|
|||
execPromise,
|
||||
pipelinePromise,
|
||||
|
||||
parseSemVersion
|
||||
parseSemVersion,
|
||||
|
||||
isOdd,
|
||||
toEven
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue