mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
FFProbe: add format provider to correctly parse the video's duration
#31
This commit is contained in:
parent
7b9b8afac8
commit
d599592084
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ private VideoInfo ParseVideoInfoInternal(VideoInfo info, string probeOutput)
|
|||
double videoSize = 0d;
|
||||
double audioSize = 0d;
|
||||
|
||||
var duration = TimeSpan.FromSeconds(double.TryParse((video ?? audio).Duration, out var output) ? output : 0);
|
||||
var duration = TimeSpan.FromSeconds(double.TryParse((video ?? audio).Duration, NumberStyles.Any, CultureInfo.InvariantCulture, out var output) ? output : 0);
|
||||
info.Duration = duration.Subtract(TimeSpan.FromMilliseconds(duration.Milliseconds));
|
||||
|
||||
if (video != null)
|
||||
|
|
Loading…
Reference in a new issue