Skip to content

Commit

Permalink
Seek both streams even when the left exceeds EOF; allows decoding wit…
Browse files Browse the repository at this point in the history
…h updated format conversion settings
  • Loading branch information
jonfryd committed Nov 21, 2024
1 parent a4d1ae8 commit 7d61afd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions video_compare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,15 @@ void VideoCompare::compare() {
}
}

bool backward = (display_->get_seek_relative() < 0.0F) || (display_->get_shift_right_frames() != 0);
const bool backward = (display_->get_seek_relative() < 0.0F) || (display_->get_shift_right_frames() != 0);

#ifdef _DEBUG
std::cout << "SEEK: next_left_position=" << (int)(next_left_position * 1000) << ", next_right_position=" << (int)(next_right_position * 1000) << ", backward=" << backward << std::endl;
#endif
if ((!demuxers_[LEFT]->seek(next_left_position, backward) && !backward) || (!demuxers_[RIGHT]->seek(next_right_position, backward) && !backward)) {
const bool left_seek_result = demuxers_[LEFT]->seek(next_left_position, backward);
const bool right_seek_result = demuxers_[RIGHT]->seek(next_right_position, backward);

if ((!left_seek_result && !backward) || (!right_seek_result && !backward)) {
// restore position if unable to perform forward seek
message = "Unable to seek past end of file";

Expand Down

0 comments on commit 7d61afd

Please sign in to comment.