From fed7d0464aeb12082b69ef72a7462f9402e66354 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Mon, 8 Jul 2024 22:44:29 -0500 Subject: [PATCH] format fix --- server/src/services/media.service.spec.ts | 7 ++++++- server/src/utils/media.ts | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/server/src/services/media.service.spec.ts b/server/src/services/media.service.spec.ts index c0dae0170d..d4ec8e6533 100644 --- a/server/src/services/media.service.spec.ts +++ b/server/src/services/media.service.spec.ts @@ -1839,7 +1839,12 @@ describe(MediaService.name, () => { '/original/path.ext', 'upload/encoded-video/user-id/as/se/asset-id.mp4', { - inputOptions: expect.arrayContaining(['-hwaccel rkmpp', '-hwaccel_output_format drm_prime', '-afbc rga', '-noautorotate']), + inputOptions: expect.arrayContaining([ + '-hwaccel rkmpp', + '-hwaccel_output_format drm_prime', + '-afbc rga', + '-noautorotate', + ]), outputOptions: expect.arrayContaining([ `-c:v h264_rkmpp`, '-c:a copy', diff --git a/server/src/utils/media.ts b/server/src/utils/media.ts index fe6df909be..cf8e438349 100644 --- a/server/src/utils/media.ts +++ b/server/src/utils/media.ts @@ -732,7 +732,13 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig { throw new Error('No QSV device found'); } - const options = ['-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', '-noautorotate', ...this.getInputThreadOptions()]; + const options = [ + '-hwaccel qsv', + '-hwaccel_output_format qsv', + '-async_depth 4', + '-noautorotate', + ...this.getInputThreadOptions(), + ]; const hwDevice = this.getPreferredHardwareDevice(); if (hwDevice) { options.push(`-qsv_device ${hwDevice}`);