Fix toEven

This commit is contained in:
Chocobozzz 2021-06-08 13:08:34 +02:00
parent 37ede348bb
commit b7c8304cfd
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 5 deletions

View File

@ -248,7 +248,7 @@ function isOdd (num: number) {
}
function toEven (num: number) {
if (isOdd) return num + 1
if (isOdd(num)) return num + 1
return num
}

View File

@ -3,14 +3,12 @@ import * as ffmpeg from 'fluent-ffmpeg'
import { readFile, remove, writeFile } from 'fs-extra'
import { dirname, join } from 'path'
import { FFMPEG_NICE, VIDEO_LIVE } from '@server/initializers/constants'
import { AvailableEncoders, EncoderOptionsBuilder, EncoderOptions, EncoderProfile, VideoResolution } from '../../shared/models/videos'
import { AvailableEncoders, EncoderOptions, EncoderOptionsBuilder, EncoderProfile, VideoResolution } from '../../shared/models/videos'
import { CONFIG } from '../initializers/config'
import { execPromise, isOdd, promisify0 } from './core-utils'
import { execPromise, promisify0 } from './core-utils'
import { computeFPS, getAudioStream, getVideoFileFPS } from './ffprobe-utils'
import { processImage } from './image-utils'
import { logger } from './logger'
import { FilterSpecification } from 'fluent-ffmpeg'
import { findCommentId } from '@shared/extra-utils'
/**
*