Fix toEven
This commit is contained in:
parent
37ede348bb
commit
b7c8304cfd
2 changed files with 3 additions and 5 deletions
|
@ -248,7 +248,7 @@ function isOdd (num: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toEven (num: number) {
|
function toEven (num: number) {
|
||||||
if (isOdd) return num + 1
|
if (isOdd(num)) return num + 1
|
||||||
|
|
||||||
return num
|
return num
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,12 @@ import * as ffmpeg from 'fluent-ffmpeg'
|
||||||
import { readFile, remove, writeFile } from 'fs-extra'
|
import { readFile, remove, writeFile } from 'fs-extra'
|
||||||
import { dirname, join } from 'path'
|
import { dirname, join } from 'path'
|
||||||
import { FFMPEG_NICE, VIDEO_LIVE } from '@server/initializers/constants'
|
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 { 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 { computeFPS, getAudioStream, getVideoFileFPS } from './ffprobe-utils'
|
||||||
import { processImage } from './image-utils'
|
import { processImage } from './image-utils'
|
||||||
import { logger } from './logger'
|
import { logger } from './logger'
|
||||||
import { FilterSpecification } from 'fluent-ffmpeg'
|
|
||||||
import { findCommentId } from '@shared/extra-utils'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue