Commit e5729af5 authored by zaggy1024's avatar zaggy1024
Browse files

Bug 1810613 - Part 2 - Apply loop counts from AVIF animation files. r=tnikkel

parent 72068f13
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -1756,7 +1756,19 @@ nsAVIFDecoder::DecodeResult nsAVIFDecoder::Decode(
    }

    if (isDone) {
      switch (mParser->GetInfo().loop_mode) {
        case MP4PARSE_AVIF_LOOP_MODE_LOOP_BY_COUNT: {
          auto loopCount = mParser->GetInfo().loop_count;
          PostDecodeDone(
              loopCount > INT32_MAX ? -1 : static_cast<int32_t>(loopCount));
          break;
        }
        case MP4PARSE_AVIF_LOOP_MODE_LOOP_INFINITELY:
        case MP4PARSE_AVIF_LOOP_MODE_NO_EDITS:
        default:
          PostDecodeDone(-1);
          break;
      }
      return DecodeResult(NonDecoderResult::Complete);
    }

+1.3 KiB

File added.

No diff preview for this file type.

+1.93 KiB

File added.

No diff preview for this file type.

+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ support-files =
  animated-gif2.gif
  animated-gif_trailing-garbage.gif
  animated-gif-finalframe.gif
  animated-avif.avif
  animation.svg
  animationPolling.js
  bad.jpg
@@ -49,6 +50,7 @@ support-files =
  clear.gif
  clear.png
  clear.webp
  clear.avif
  clear2.gif
  clear2.webp
  clear2-results.gif
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ var gTests = [
  "== green-background.html?clear.gif green.png",
  "== green-background.html?clear.png green.png",
  "== green-background.html?clear.webp green.png",
  "== green-background.html?clear.avif green.png",
  "== keep.gif green.png",
  "== keep.png green.png",
  "== keep.webp green.png",
Loading