diff --git a/packager/mpd/base/representation.cc b/packager/mpd/base/representation.cc index 8bae948911..1340c2e502 100644 --- a/packager/mpd/base/representation.cc +++ b/packager/mpd/base/representation.cc @@ -420,7 +420,7 @@ bool Representation::ApproximiatelyEqual(int64_t time1, int64_t time2) const { std::min(frame_duration_, static_cast(kErrorThresholdSeconds * media_info_.reference_time_scale())); - return time1 <= time2 + error_threshold && time2 <= time1 + error_threshold; + return std::abs(time1 - time2) <= error_threshold; } int64_t Representation::AdjustDuration(int64_t duration) const {