1
0
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:
Mikael Finstad 2024-09-25 15:47:33 +08:00
parent fa7b36f69f
commit 93fe368487
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -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);
} }
}); });
} }