Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Jul 20, 2024
1 parent d76829b commit 6d973b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/src/hooks/useFfmpegOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea

const copyFileStreamsFiltered = [{
path: filePath,
// with smart cut, we only copy/cut *one* video stream, but *all* other streams (main file only)
streamIds: streamsToCopyFromMainFile.filter((stream) => !(stream.codec_type === 'video' && stream.index !== videoStreamIndex)).map((stream) => stream.index),
// with smart cut, we only copy/cut *one* video stream, and *all* other non-video streams (main file only)
streamIds: streamsToCopyFromMainFile.filter((stream) => stream.index === videoStreamIndex || stream.codec_type !== 'video').map((stream) => stream.index),
}];

// eslint-disable-next-line no-shadow
Expand Down

0 comments on commit 6d973b4

Please sign in to comment.