]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix toEven
authorChocobozzz <me@florianbigard.com>
Tue, 8 Jun 2021 11:08:34 +0000 (13:08 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 8 Jun 2021 11:14:02 +0000 (13:14 +0200)
server/helpers/core-utils.ts
server/helpers/ffmpeg-utils.ts

index f7e6fdddcf79fb0ec70c37b96301b36fa91c9aa3..9abc532d28741f94c9dec872de8734a32b0f1f41 100644 (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
 }
index d20ca5d5693fdc1de50ee189a9883a2f708f5973..585230e2da5daf859b2581f52627eaec5f07e669 100644 (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'
 
 /**
  *