Skip to content

Commit

Permalink
fix: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lee.fordyce committed Feb 6, 2024
1 parent 8b8c277 commit 960d72c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packager/media/formats/mp4/track_run_iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,14 @@ void TrackRunIterator::ResetRun() {
sample_offset_ = run_itr_->sample_start_offset;
sample_itr_ = run_itr_->samples.begin();

int64_t min_cts_offset(0);
auto min_runs =
auto min_sample_itr =
std::min_element(run_itr_->samples.begin(), run_itr_->samples.end(),
[](SampleInfo const& s1, SampleInfo const& s2) {
return s1.cts_offset < s2.cts_offset;
});
if (min_runs != run_itr_->samples.end() && min_runs->cts_offset < 0) {
min_cts_offset = min_runs->cts_offset;
if (min_sample_itr != run_itr_->samples.end() && min_sample_itr->cts_offset < 0) {
min_cts_offset_ = min_sample_itr->cts_offset;
}
min_cts_offset_ = min_cts_offset;
}

void TrackRunIterator::AdvanceSample() {
Expand Down

0 comments on commit 960d72c

Please sign in to comment.