diff --git a/packager/mpd/base/mpd_builder.cc b/packager/mpd/base/mpd_builder.cc index f09381601e..e2241dc2e3 100644 --- a/packager/mpd/base/mpd_builder.cc +++ b/packager/mpd/base/mpd_builder.cc @@ -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