Index: media/gpu/h264_decoder.cc |
diff --git a/media/gpu/h264_decoder.cc b/media/gpu/h264_decoder.cc |
index aed9658374805c9854aaf4c0fa76dc34e67a5412..d5b0aee8f0928bb020abfb149693301370500b33 100644 |
--- a/media/gpu/h264_decoder.cc |
+++ b/media/gpu/h264_decoder.cc |
@@ -177,6 +177,8 @@ bool H264Decoder::InitCurrPicture(const H264SliceHeader* slice_hdr) { |
sizeof(curr_pic_->ref_pic_marking)); |
} |
+ curr_pic_->visible_rect = visible_rect_; |
+ |
return true; |
} |
@@ -1124,6 +1126,12 @@ bool H264Decoder::ProcessSPS(int sps_id, bool* need_new_buffers) { |
dpb_.set_max_num_pics(max_dpb_size); |
} |
+ gfx::Rect new_visible_rect = sps->GetVisibleRect().value_or(gfx::Rect()); |
+ if (visible_rect_ != new_visible_rect) { |
+ DVLOG(2) << "New visible rect: " << new_visible_rect.ToString(); |
+ visible_rect_ = new_visible_rect; |
+ } |
+ |
if (!UpdateMaxNumReorderFrames(sps)) |
return false; |
DVLOG(1) << "max_num_reorder_frames: " << max_num_reorder_frames_; |