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:
parent
12b32f1f80
commit
edcea27d3e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user