Commit 6559349f authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

Fix android.media.cts.AdaptivePlaybackTest#test(H264/VP8/VP9)_adaptiveDrcEarlyEos

ProvidePictureBuffers() triggers AssignPictureBuffers() and ImportPictureBuffers()
in this order. The size of an imported picture in ImportPictureBuffers() is
updated in ProvidePictureBuffers(). However, ImportPictureBuffers() can be
called between ProvidePictureBuffers() and ImportPictureBuffers(), when a client
already queues ImportPictureBuffers() for old imported pictures. In this case,
the size of an picture imported by ImportPictureBuffers is different from one
updated in ProvidePictureBuffers. Therefore, verifyDmaBbuf() is failed.
To resolve this problem, an imported picture size is updated in
AssignPictureBuffers(), not ProvidePictureBuffers().

TEST=CtsMediaTestCases on minnie and eve
BUG=b:70767025

Change-Id: I6451a0c9d86b21010fc72071f6d5a3e45dee590f
Reviewed-on: https://chromium-review.googlesource.com/831324Reviewed-by: default avatarKuang-che Wu <kcwu@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524672}
parent e159182e
......@@ -182,7 +182,7 @@ void GpuArcVideoDecodeAccelerator::ProvidePictureBuffers(
}
output_pixel_format_ = format;
coded_size_ = dimensions;
pending_coded_size_ = dimensions;
mojom::PictureBufferFormatPtr pbf = mojom::PictureBufferFormat::New();
pbf->pixel_format = pixel_format;
......@@ -527,6 +527,8 @@ void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count) {
mojom::VideoDecodeAccelerator::Result::INVALID_ARGUMENT);
return;
}
coded_size_ = pending_coded_size_;
std::vector<media::PictureBuffer> buffers;
for (uint32_t id = 0; id < count; ++id) {
buffers.push_back(
......
......@@ -146,6 +146,7 @@ class GpuArcVideoDecodeAccelerator
mojom::VideoDecodeClientPtr client_;
gfx::Size coded_size_;
gfx::Size pending_coded_size_;
media::VideoPixelFormat output_pixel_format_ = media::PIXEL_FORMAT_UNKNOWN;
// Owned by caller.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment