From 079c03d5518d18b65571c02f75765ba170428214 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:11:40 +0000 Subject: [PATCH] Don't remove new stream when original stream removed --- .../ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js | 1 + .../ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js index 34fd669e9..0acee6a7f 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js @@ -203,6 +203,7 @@ var attemptMakeStream = function (_a) { } args.jobLog("Adding ".concat(langTag, " stream in ").concat(audioEncoder, ", ").concat(targetChannels, " channels \n")); var streamCopy = JSON.parse(JSON.stringify(streamWithHighestChannel)); + streamCopy.removed = false; streamCopy.index = streams.length; streamCopy.outputArgs.push('-c:{outputIndex}', audioEncoder); streamCopy.outputArgs.push('-ac', "".concat(targetChannels)); diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts index 5fd0ef964..ff3b084a9 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts @@ -242,6 +242,7 @@ const attemptMakeStream = ({ args.jobLog(`Adding ${langTag} stream in ${audioEncoder}, ${targetChannels} channels \n`); const streamCopy: IffmpegCommandStream = JSON.parse(JSON.stringify(streamWithHighestChannel)); + streamCopy.removed = false; streamCopy.index = streams.length; streamCopy.outputArgs.push('-c:{outputIndex}', audioEncoder); streamCopy.outputArgs.push('-ac', `${targetChannels}`);