Skip to content

Commit

Permalink
Fix crash upon attempting to replay video.
Browse files Browse the repository at this point in the history
b/318420573

Change-Id: Icc959ad87aafe10adea0d737984bd6e781e28835
  • Loading branch information
v-kryachko committed Jan 5, 2024
1 parent 48ecc6f commit 20fcc06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion starboard/xb1/shared/gpu_base_video_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,9 @@ int GpuVideoDecoderBase::OnOutputRetrieved(
if (is_hdr_video_) {
image->AttachColorMetadata((*iter)->video_stream_info().color_metadata);
}
written_inputs_.erase(iter);
if (iter != written_inputs_.cend()) {
written_inputs_.erase(iter);
}
}
scoped_refptr<VideoFrameImpl> frame(new VideoFrameImpl(
timestamp, std::bind(&GpuVideoDecoderBase::DeleteVideoFrame, this,
Expand Down

0 comments on commit 20fcc06

Please sign in to comment.