Commit 502d5761 authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Better error msg for frame/container size mismatch

Include the frame size and container size in the error message when they
differ.

Bug: 960620
Change-Id: Ia40e4306059bbeb6039e9e60018cfc42d44f3941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419587Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808657}
parent d0756361
......@@ -361,9 +361,10 @@ void AVIFImageDecoder::DecodeToYUV() {
}
const auto* image = decoder_->image;
// All frames must be the same size.
// Frame size must be equal to container size.
if (Size() != IntSize(image->width, image->height)) {
DVLOG(1) << "All frames must be the same size";
DVLOG(1) << "Frame size " << IntSize(image->width, image->height)
<< " differs from container size " << Size();
SetFailed();
return;
}
......@@ -528,9 +529,10 @@ void AVIFImageDecoder::Decode(size_t index) {
}
const auto* image = decoder_->image;
// All frames must be the same size.
// Frame size must be equal to container size.
if (Size() != IntSize(image->width, image->height)) {
DVLOG(1) << "All frames must be the same size";
DVLOG(1) << "Frame size " << IntSize(image->width, image->height)
<< " differs from container size " << Size();
SetFailed();
return;
}
......
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