Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix avif_fuzztest_enc_dec_anim for AVIF_ADD_IMAGE_FLAG_SINGLE… #1965

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions tests/gtest/avif_fuzztest_enc_dec_anim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,10 @@ void EncodeDecodeAnimation(ImagePtr frame,
int total_duration = 0;

// Encode.
for (size_t i = 0; i < frame_options.size(); ++i) {
const FrameOptions& options = frame_options[i];
for (const FrameOptions& options : frame_options) {
total_duration += options.duration;
const avifResult result = avifEncoderAddImage(
encoder.get(), frame.get(), options.duration, options.flags);
// AVIF_ADD_IMAGE_FLAG_SINGLE can only be used on one image.
if ((frame_options[0].flags & AVIF_ADD_IMAGE_FLAG_SINGLE) && i > 0) {
ASSERT_EQ(result, AVIF_RESULT_ENCODE_COLOR_FAILED)
<< avifResultToString(result) << " " << encoder->diag.error;
return;
}
// AVIF_ADD_IMAGE_FLAG_SINGLE can only be used on the first image.
// It also cannot be set for layered images.
if ((options.flags & AVIF_ADD_IMAGE_FLAG_SINGLE) &&
(i > 0 || encoder->extraLayerCount > 0)) {
ASSERT_EQ(result, AVIF_RESULT_INVALID_ARGUMENT)
<< avifResultToString(result) << " " << encoder->diag.error;
return;
}

ASSERT_EQ(result, AVIF_RESULT_OK)
<< avifResultToString(result) << " " << encoder->diag.error;
}
Expand Down
Loading