| Index: content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
|
| diff --git a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
|
| index 5908fd61750db67fdf76115b686bbbdcccd64803..04a1fed45bce63b8ba1d2cd9755bc3ade94566f2 100644
|
| --- a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
|
| @@ -394,6 +394,7 @@ V4L2SliceVideoDecodeAccelerator::V4L2SliceVideoDecodeAccelerator(
|
| output_buffer_queued_count_(0),
|
| video_profile_(media::VIDEO_CODEC_PROFILE_UNKNOWN),
|
| output_format_fourcc_(0),
|
| + min_picture_count_(0),
|
| state_(kUninitialized),
|
| decoder_flushing_(false),
|
| decoder_resetting_(false),
|
| @@ -434,6 +435,7 @@ void V4L2SliceVideoDecodeAccelerator::NotifyError(Error error) {
|
|
|
| bool V4L2SliceVideoDecodeAccelerator::Initialize(
|
| media::VideoCodecProfile profile,
|
| + uint32_t min_picture_count,
|
| VideoDecodeAccelerator::Client* client) {
|
| DVLOGF(3) << "profile: " << profile;
|
| DCHECK(child_task_runner_->BelongsToCurrentThread());
|
| @@ -444,6 +446,7 @@ bool V4L2SliceVideoDecodeAccelerator::Initialize(
|
| client_ = client_ptr_factory_->GetWeakPtr();
|
|
|
| video_profile_ = profile;
|
| + min_picture_count_ = min_picture_count;
|
|
|
| if (video_profile_ >= media::H264PROFILE_MIN &&
|
| video_profile_ <= media::H264PROFILE_MAX) {
|
| @@ -683,7 +686,9 @@ bool V4L2SliceVideoDecodeAccelerator::CreateOutputBuffers() {
|
| DCHECK(surfaces_at_device_.empty());
|
|
|
| visible_size_ = decoder_->GetPicSize();
|
| - size_t num_pictures = decoder_->GetRequiredNumOfPictures();
|
| + size_t num_pictures = std::max(min_picture_count_,
|
| + static_cast<uint32_t>(
|
| + decoder_->GetRequiredNumOfPictures()));
|
|
|
| DCHECK_GT(num_pictures, 0u);
|
| DCHECK(!visible_size_.IsEmpty());
|
|
|