Clean up difference comparison in representation.cc

Change-Id: Ibde83d1b8b2f644899f93790978d906dba5d4c14
This commit is contained in:
KongQun Yang 2018-06-21 18:37:56 -07:00
parent 1600909c4b
commit f21d93dd65
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ bool Representation::ApproximiatelyEqual(int64_t time1, int64_t time2) const {
std::min(frame_duration_, std::min(frame_duration_,
static_cast<uint32_t>(kErrorThresholdSeconds * static_cast<uint32_t>(kErrorThresholdSeconds *
media_info_.reference_time_scale())); 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 { int64_t Representation::AdjustDuration(int64_t duration) const {