mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-25 03:33:14 +01:00
remove unnecessary code
This commit is contained in:
parent
fa7b36f69f
commit
93fe368487
@ -104,11 +104,10 @@ function handleProgress(
|
|||||||
if (durationIn == null) return;
|
if (durationIn == null) return;
|
||||||
const duration = Math.max(0, durationIn);
|
const duration = Math.max(0, durationIn);
|
||||||
if (duration === 0) return;
|
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);
|
onProgress(progress);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// @ts-expect-error todo
|
logger.error('Failed to parse ffmpeg progress line:', err instanceof Error ? err.message : err);
|
||||||
logger.error('Failed to parse ffmpeg progress line:', err.message);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user