fix: Prevent crash in GetEarliestTimestamp() if periods are empty (#1173)
While I have not yet found why the periods are empty, this will prevent shaka from seg faulting Fixes #1172
This commit is contained in:
parent
dab165d3e5
commit
d6f28d456c
|
@ -342,6 +342,8 @@ float MpdBuilder::GetStaticMpdDuration() {
|
|||
bool MpdBuilder::GetEarliestTimestamp(double* timestamp_seconds) {
|
||||
DCHECK(timestamp_seconds);
|
||||
DCHECK(!periods_.empty());
|
||||
if (periods_.empty())
|
||||
return false;
|
||||
double timestamp = 0;
|
||||
double earliest_timestamp = -1;
|
||||
// TODO(kqyang): This is used to set availabilityStartTime. We may consider
|
||||
|
|
Loading…
Reference in New Issue