| Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
| diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
| index d54db04d18521171113f799347a0c520417c4a57..06b0823c10cbaf7fee5bbaa72ca75e5d0eceea0a 100644
|
| --- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
| @@ -67,6 +67,10 @@ VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
|
| client_(client_ptr_factory_.GetWeakPtr()),
|
| decoder_thread_("VaapiDecoderThread") {
|
| DCHECK(client);
|
| + static bool vaapi_functions_initialized = PostSandboxInitialization();
|
| + RETURN_AND_NOTIFY_ON_FAILURE(vaapi_functions_initialized,
|
| + "Failed to initialize VAAPI libs",
|
| + PLATFORM_FAILURE, );
|
| }
|
|
|
| VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() {
|
| @@ -555,6 +559,16 @@ void VaapiVideoDecodeAccelerator::Destroy() {
|
| delete this;
|
| }
|
|
|
| +// static
|
| +void VaapiVideoDecodeAccelerator::PreSandboxInitialization() {
|
| + VaapiH264Decoder::PreSandboxInitialization();
|
| +}
|
| +
|
| +// static
|
| +bool VaapiVideoDecodeAccelerator::PostSandboxInitialization() {
|
| + return VaapiH264Decoder::PostSandboxInitialization();
|
| +}
|
| +
|
| void VaapiVideoDecodeAccelerator::OutputPicCallback(int32 input_id,
|
| int32 output_id) {
|
| TRACE_EVENT2("Video Decoder", "VAVDA::OutputPicCallback",
|
|
|