|
|
|
@ -6,7 +6,11 @@ public record PtsAndDuration(long Pts, long Duration) |
|
|
|
{ |
|
|
|
{ |
|
|
|
string[] split = ffprobeLine.Split("|"); |
|
|
|
string[] split = ffprobeLine.Split("|"); |
|
|
|
var left = long.Parse(split[0]); |
|
|
|
var left = long.Parse(split[0]); |
|
|
|
var right = long.Parse(split[1]); |
|
|
|
if (!long.TryParse(split[1], out long right)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// some durations are N/A, so we have to guess at something
|
|
|
|
|
|
|
|
right = 10_000; |
|
|
|
|
|
|
|
} |
|
|
|
return new PtsAndDuration(left, right); |
|
|
|
return new PtsAndDuration(left, right); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|