mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-21 18:02:35 +01:00
remove unnecessary code
This commit is contained in:
parent
fa7b36f69f
commit
93fe368487
@ -104,11 +104,10 @@ function handleProgress(
|
||||
if (durationIn == null) return;
|
||||
const duration = Math.max(0, durationIn);
|
||||
if (duration === 0) return;
|
||||
const progress = duration ? Math.min(progressTime / duration, 1) : 0; // sometimes progressTime will be greater than cutDuration
|
||||
const progress = Math.min(progressTime / duration, 1); // sometimes progressTime will be greater than cutDuration
|
||||
onProgress(progress);
|
||||
} catch (err) {
|
||||
// @ts-expect-error todo
|
||||
logger.error('Failed to parse ffmpeg progress line:', err.message);
|
||||
logger.error('Failed to parse ffmpeg progress line:', err instanceof Error ? err.message : err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user