1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-24 19:32:29 +01:00

simplify logic

This commit is contained in:
Mikael Finstad 2024-07-20 16:09:30 +02:00
parent d76829b35b
commit 6d973b4b08
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -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