fallbacksrc: Actually calculate running times of segment start/stop if the PTS is outside the segment

Previously it was just using the segment start/stop without converting
it to the corresponding running time.
This commit is contained in:
Sebastian Dröge 2021-12-09 12:30:42 +02:00
parent 6db599e5ae
commit 86021d637b

View file

@ -1573,9 +1573,9 @@ impl FallbackSrc {
let running_time = if let Some((_, start)) =
pts.zip(segment.start()).filter(|(pts, start)| pts < start)
{
Some(start)
segment.to_running_time(start)
} else if let Some((_, stop)) = pts.zip(segment.stop()).filter(|(pts, stop)| pts >= stop) {
Some(stop)
segment.to_running_time(stop)
} else {
segment.to_running_time(pts)
};