Return target duration of 1 when no segments (#40518)
This commit is contained in:
parent
5658abfaca
commit
e85d1deddd
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ class StreamOutput:
|
||||||
"""Return the max duration of any given segment in seconds."""
|
"""Return the max duration of any given segment in seconds."""
|
||||||
segment_length = len(self._segments)
|
segment_length = len(self._segments)
|
||||||
if not segment_length:
|
if not segment_length:
|
||||||
return 0
|
return 1
|
||||||
durations = [s.duration for s in self._segments]
|
durations = [s.duration for s in self._segments]
|
||||||
return round(max(durations)) or 1
|
return round(max(durations)) or 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue