1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00

FIX: Failed to read media characteristics: For input string: "3498974.500000"

This commit is contained in:
Reinhard Pointner 2018-07-16 19:45:21 +07:00
parent 12b32f1f80
commit edcea27d3e
2 changed files with 4 additions and 5 deletions

View File

@ -77,10 +77,8 @@ public class FFProbe implements MediaCharacteristics {
@Override
public Duration getDuration() {
double seconds = Double.parseDouble(getFormat().get("duration").toString());
long millis = (long) (seconds * 1000);
return Duration.ofMillis(millis);
long d = (long) Double.parseDouble(getFormat().get("duration").toString()) * 1000;
return Duration.ofMillis(d);
}
@Override

View File

@ -161,7 +161,8 @@ public class MediaInfo implements MediaCharacteristics {
@Override
public Duration getDuration() {
return Duration.ofMillis(Long.parseLong(get(StreamKind.General, 0, "Duration")));
long d = (long) Double.parseDouble(get(StreamKind.General, 0, "Duration"));
return Duration.ofMillis(d);
}
@Override