Skip to content

aniyomi-ffmpeg-kit 1.17.1

Choose a tag to compare

@bee-san bee-san released this 31 Jul 16:36

Fork of jmir1/ffmpeg-kit 1.17 with one FFmpeg backport needed for portable animated AVIF scene mining.

What changed vs 1.17

  • Backport FFmpeg e44d76f61favformat/av1: fix uvlc loop past end of bitstream.

    libavformat/av1.c:uvlc() looped on while (get_bits_left(gb)). When an earlier skip_bits_long() has already pushed the reader past the end of a truncated AV1 sequence header, get_bits_left() is negative — which is truthy — so the loop never terminates and leading_zeros climbs toward INT_MAX. uvlc() is reached from parse_sequence_header(), which ff_isom_write_av1c() calls to build the av1C configuration box — the exact path used when muxing av1_mediacodec output into AVIF.

Everything else is identical to upstream 1.17: same FFmpeg n7.1 base, same enabled components, same aniyomi SAF protocol and custom-protocol patches.

Build

  • Built from tag 1.17.1 via ./android.sh --lts --disable-arm-v7a-neon --enable-cpu-features with NDK r27c, all four ABIs (armeabi-v7a, arm64-v8a, x86, x86_64).
  • Patch applied by an idempotent loop in android.sh (tools/patches/*.patch).

Verification

  • All four ABIs report FFmpeg version n7.1 and contain the avif muxer.
  • Disassembly of libavformat.so confirms the fix is present: the stock 1.17 build emits the unbounded cmp / cinc increment for the uvlc leading-zero count; this build emits the guarded get_bits_left(gb) < 1 check (cset + bounded csel) instead.
  • The arm64-v8a libavformat.so is byte-identical across two independent builds (reproducible).

Consume via JitPack at com.github.bee-san:ffmpeg-kit:1.17.1.