| Index: content/common/gpu/media/mac_video_decode_accelerator.mm
|
| diff --git a/content/common/gpu/media/mac_video_decode_accelerator.mm b/content/common/gpu/media/mac_video_decode_accelerator.mm
|
| index a68b4d22c41114c19af4a5be6c20040fd812b2d0..e926aee42476ca5fa2c07d811ca0bc0082421d5d 100644
|
| --- a/content/common/gpu/media/mac_video_decode_accelerator.mm
|
| +++ b/content/common/gpu/media/mac_video_decode_accelerator.mm
|
| @@ -95,25 +95,25 @@ void MacVideoDecodeAccelerator::SetGLContext(void* gl_context) {
|
| cgl_context_ = static_cast<CGLContextObj>(gl_context);
|
| }
|
|
|
| -bool MacVideoDecodeAccelerator::SetConfigInfo(
|
| - uint32_t frame_width,
|
| - uint32_t frame_height,
|
| - const std::vector<uint8_t>& avc_data) {
|
| - frame_width_ = frame_width;
|
| - frame_height_ = frame_height;
|
| - nalu_len_field_size_ = (avc_data[4] & 0x03) + 1;
|
| +bool MacVideoDecodeAccelerator::Initialize(
|
| + media::VideoCodecProfile profile,
|
| + const gfx::Size& frame_size,
|
| + const std::vector<uint8_t>& extra_data) {
|
| + if (extra_data.size() < 5)
|
| + return false;
|
| +
|
| + frame_width_ = frame_size.width();
|
| + frame_height_ = frame_size.height();
|
| + nalu_len_field_size_ = (extra_data[4] & 0x03) + 1;
|
|
|
| DCHECK(!vda_.get());
|
| vda_ = new gfx::VideoDecodeAccelerationSupport();
|
| gfx::VideoDecodeAccelerationSupport::Status status = vda_->Create(
|
| frame_width_, frame_height_,
|
| - kCVPixelFormatType_422YpCbCr8, &avc_data.front(), avc_data.size());
|
| + kCVPixelFormatType_422YpCbCr8, &extra_data.front(), extra_data.size());
|
| if (status != gfx::VideoDecodeAccelerationSupport::VDA_SUCCESS)
|
| return false;
|
| - return true;
|
| -}
|
|
|
| -bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) {
|
| if (client_)
|
| client_->NotifyInitializeDone();
|
| return true;
|
|
|