From b7c8304cfd954846852f47430ecf03f39ce85099 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jun 2021 13:08:34 +0200 Subject: Fix toEven --- server/helpers/core-utils.ts | 2 +- server/helpers/ffmpeg-utils.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index f7e6fdddc..9abc532d2 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts @@ -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 } diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index d20ca5d56..585230e2d 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -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' /** * -- cgit v1.2.3