Files
marfrit-packages/arch
marfrit e0af915788
build and publish packages / distcc-avahi-aarch64 (push) Successful in 33s
build and publish packages / lmcp-any (push) Successful in 7s
build and publish packages / lmcp-debian (push) Successful in 6s
build and publish packages / claude-his-any (push) Successful in 8s
build and publish packages / claude-his-debian (push) Has been cancelled
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Has been cancelled
firefox-fourier patch 3: probe v4l2_request via codec name first
Diagnostic on fresnel (RK3399 / Mali-T860 / mainline) showed
InitV4L2RequestDecoder running at runtime but failing the
hw_configs sanity check:

  FFMPEG: Initialising V4L2 stateless (request API) FFmpeg decoder
  FFMPEG:   codec h264 has no DRM hwaccel —
            libavcodec built without --enable-v4l2-request?
  FFMPEG: Initialising V4L2-DRM FFmpeg decoder      ← falls through to stateful
  FFMPEG:   V4L2 codec h264_v4l2m2m : V4L2 mem2mem H.264 decoder wrapper
  FFMPEG:   Couldn't initialise V4L2 decoder        ← stateful also fails

…despite the system libavcodec.so being built with
--enable-v4l2-request and exposing h264_v4l2request, vp8_v4l2request,
etc. as named AVCodec entries.

Root cause: libavcodec exposes v4l2_request through one of two
mechanisms depending on the build:
  (a) Named AVCodec entry (legacy, distro-portable): looked up via
      avcodec_find_decoder_by_name("h264_v4l2request"). ALARM,
      Debian, most distros use this.
  (b) hw_configs entry on the generic codec (modern, upstream): the
      generic codec's AVCodecHWConfig array advertises
      AV_HWDEVICE_TYPE_DRM. Setting hw_device_ctx binds the hwaccel.

Patch 3 originally only probed (b). On builds that ship (a) — the
common case — the check failed even though v4l2_request was fully
functional.

Fix: probe (a) first via the codec-name lookup table, fall back to
(b) walking hw_configs. Both shapes work; the decoder is opened with
whichever AVCodec the probe selected. The DRM hwdevice ctx
attachment is unchanged (both mechanisms need it for surface
allocation).

Patch description and the in-code comment block updated to document
the dual mechanism. Behaviour on stateful-only boards (Pi4 / vendor
MPP) preserved: neither named codec nor hw_configs DRM is registered,
the function bails out, the existing InitV4L2Decoder runs as before.
2026-04-28 21:59:01 +00:00
..