fix(linux): restore VAAPI hardware decode and AV1 software fallback in the bundled libmpv
Hardware decoding stopped working for Linux users on 2.13.0 (Fedora 44 report): every source decodes in software, and AV1 plays black video with audio. Two defects in the pinned libmpv build. First, mpv's meson 'drm' feature silently disabled itself because the CI builder lacks libdisplay-info, and every VAAPI path that does not depend on a display server is derived from it: vaapi-copy's standalone render-node device (the path 2.12.1 worked on) and the GL dmabuf interop for direct vaapi. With only the Wayland VA provider compiled in, a machine whose Wayland VA display fails to initialize has no fallback, and vaapi-copy has an empty provider list - every source lands on software decoding. Pin -Ddrm=enabled, -Dvaapi-drm=enabled, -Degl=enabled and -Dvaapi-wayland=enabled, and add libdisplay-info-dev to the CI package lists, so a missing piece fails the build instead of shipping silent software decode. Second, the bundled static FFmpeg has no AV1 software decoder: its native av1 codec is hardware-accelerated only, so once hwdec fails there is no AV1 path at all - every packet errors, video hits EOF, the plane goes black while audio keeps playing. Pin dav1d 1.5.4 (both VideoLAN remotes agree on the tag object and root commit), build it static before ffmpeg, and pass --enable-libdav1d. The build-plan stub test now asserts the hwdec feature flags, the dav1d static build, and ffmpeg's libdav1d. Verified in an ubuntu:24.04 container with the production flag sets: meson reports drm, vaapi-drm, vaapi-wayland, egl and dmabuf-interop-gl enabled, and ffmpeg configures CONFIG_LIBDAV1D=yes with the AV1 VAAPI hwaccel. close #1874
This commit is contained in:
@@ -13,7 +13,7 @@ from typing import Any
|
||||
|
||||
HEX_256 = re.compile(r"^[0-9a-f]{64}$")
|
||||
HEX_COMMIT = re.compile(r"^[0-9a-f]{40}$")
|
||||
NATIVE_NAMES = {"ffmpeg", "shaderc", "libplacebo", "mpv", "simdutf"}
|
||||
NATIVE_NAMES = {"dav1d", "ffmpeg", "shaderc", "libplacebo", "mpv", "simdutf"}
|
||||
BINDING_ARTIFACTS = {
|
||||
"pigeons/messages.dart",
|
||||
"android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt",
|
||||
@@ -103,8 +103,12 @@ def _validate_native(root: Path, errors: list[str]) -> None:
|
||||
elif kind == "git":
|
||||
ref = value.get("ref")
|
||||
commit = value.get("commit")
|
||||
if not isinstance(ref, str) or ref != f"v{version}":
|
||||
errors.append(f"{label}.ref: must be v{version}")
|
||||
# dav1d tags releases as bare versions ("1.5.4"); the other pinned
|
||||
# Git inputs tag them "v{version}". Either way the ref is verified
|
||||
# against the recorded commit, which is the actual pin.
|
||||
expected_ref = version if name == "dav1d" else f"v{version}"
|
||||
if not isinstance(ref, str) or ref != expected_ref:
|
||||
errors.append(f"{label}.ref: must be {expected_ref}")
|
||||
if not isinstance(commit, str) or HEX_COMMIT.fullmatch(commit) is None:
|
||||
errors.append(f"{label}.commit: must be a lowercase full Git commit")
|
||||
else:
|
||||
@@ -139,6 +143,7 @@ def _validate_native(root: Path, errors: list[str]) -> None:
|
||||
"native-inputs.json",
|
||||
'download_verified "$FFMPEG_URL" "$FFMPEG_SHA256"',
|
||||
'download_verified "$MPV_URL" "$MPV_SHA256"',
|
||||
'"$DAV1D_URL" "$DAV1D_REF" "$DAV1D_COMMIT"',
|
||||
'"$SHADERC_URL" "$SHADERC_REF" "$SHADERC_COMMIT"',
|
||||
'"$LIBPLACEBO_URL" "$LIBPLACEBO_REF" "$LIBPLACEBO_COMMIT"',
|
||||
'git submodule update --init --recursive',
|
||||
|
||||
Reference in New Issue
Block a user