| Index: content/common/gpu/media/vaapi_video_encode_accelerator.cc
|
| diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
|
| index 6cfdd9d1faa3ec46d02428d206cceb5bcd97d7d0..fa45ca91b2e626f7ff057949402a60d6f27367bf 100644
|
| --- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
|
| +++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
|
| @@ -745,6 +745,16 @@ void VaapiVideoEncodeAccelerator::RequestEncodingParametersChangeTask(
|
| DCHECK(encoder_thread_proxy_->BelongsToCurrentThread());
|
| DCHECK_NE(state_, kUninitialized);
|
|
|
| + // This is a workaround to zero being temporarily, as part of the initial
|
| + // setup, provided by the webrtc video encode and a zero bitrate and
|
| + // framerate not being accepted by VAAPI
|
| + // TODO: This code is common with v4l2_video_encode_accelerator.cc, perhaps
|
| + // it could be pulled up to RTCVideoEncoder
|
| + if (bitrate < 1)
|
| + bitrate = 1;
|
| + if (framerate < 1)
|
| + framerate = 1;
|
| +
|
| UpdateRates(bitrate, framerate);
|
|
|
| UpdateSPS();
|
|
|