mirror of
https://github.com/danbulant/discord.js
synced 2026-05-30 04:41:11 +00:00
fix(BasePlayer): incorrectly mutating FFMPEG_ARGUMENTS when using seek (#2622)
Because args was not a copy of FFMPEG_ARGIMENTS, but a reference to it, pushing 'ss' argument pushed it to FFMPEG_ARGUMENTS, making it persistent.
This commit is contained in:
parent
18646b72f9
commit
bf738b34de
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ class BasePlayer extends EventEmitter {
|
|||
|
||||
const isStream = input instanceof ReadableStream;
|
||||
|
||||
const args = isStream ? FFMPEG_ARGUMENTS : ['-i', input, ...FFMPEG_ARGUMENTS];
|
||||
const args = isStream ? FFMPEG_ARGUMENTS.slice() : ['-i', input, ...FFMPEG_ARGUMENTS];
|
||||
if (options.seek) args.push('-ss', String(options.seek));
|
||||
|
||||
const ffmpeg = new prism.FFmpeg({ args });
|
||||
|
|
|
|||
Loading…
Reference in a new issue