Skip to content

Commit

Permalink
Cherry pick PR youtube#3891: [android] Fix OOB list access in VideoFr…
Browse files Browse the repository at this point in the history
…ameTracker (youtube#3896)

Refer to the original PR: youtube#3891

b/276483058

Change-Id: I808996e1da0fa2256fbdb1564f6c2a18c06dbfc6

Co-authored-by: xiaomings <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and xiaomings authored Jul 25, 2024
1 parent 2d96ee3 commit 87d1cd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion starboard/android/shared/video_frame_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ void VideoFrameTracker::UpdateDroppedFrames() {
rendered_frames_on_tracker_thread_.swap(rendered_frames_on_decoder_thread_);
}

while (frames_to_be_rendered_.front() < seek_to_time_) {
while (!frames_to_be_rendered_.empty() &&
frames_to_be_rendered_.front() < seek_to_time_) {
// It is possible that the initial frame rendered time is before the
// seek to time, when the platform decides to render a frame earlier
// than the seek to time during preroll. This shouldn't be an issue
Expand Down

0 comments on commit 87d1cd3

Please sign in to comment.