Chromium Code Reviews| Index: media/filters/gpu_video_decoder.cc |
| diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc |
| index 6801aafc069ad2dd60c66a573d2e7f4977b47e2e..e1a77e8ef8a8e8bd939605cb92f4eefc01c7b885 100644 |
| --- a/media/filters/gpu_video_decoder.cc |
| +++ b/media/filters/gpu_video_decoder.cc |
| @@ -473,7 +473,18 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) { |
| NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); |
| return; |
| } |
| - const PictureBuffer& pb = it->second; |
| + PictureBuffer& pb = it->second; |
| + if (pb.size() != picture.visible_rect().size()) { |
|
liberato (no reviews please)
2016/03/02 16:50:36
i don't think that you want to do this uncondition
chcunningham
2016/03/02 21:46:19
Ack, happy to add a flag.
In our chat earlier I t
|
| + // Update the PictureBuffer size to match that of the Picture. Some VDA's |
| + // (e.g. Android) will handle resolution changes internally without |
| + // requesting new PictureBuffers. Sending a Picture of unmatched size is |
| + // the signal that we should update the size of our PictureBuffer. |
| + LOG(ERROR) << __FUNCTION__ << " Updating size of PictureBuffer[" << pb.id() |
| + << "]" |
| + << " from:" << pb.size().ToString() |
| + << " to:" << picture.visible_rect().size().ToString(); |
| + pb.set_size(picture.visible_rect().size()); |
| + } |
| // Update frame's timestamp. |
| base::TimeDelta timestamp; |