Unverified Commit afbb1b45 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

alvr: Fix build with ffmpeg 8 compat (#461709)

parents 1d2a08be e689bcce
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
  libva,
  libvdpau,
  libxkbcommon,
  openapv,
  openssl,
  openvr,
  pipewire,
@@ -59,6 +60,15 @@ rustPlatform.buildRustPackage rec {
    })
  ];

  postPatch = ''
    substituteInPlace alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.cpp \
      --replace-fail 'FF_PROFILE_H264_MAIN' 'AV_PROFILE_H264_MAIN' \
      --replace-fail 'FF_PROFILE_H264_BASELINE' 'AV_PROFILE_H264_BASELINE' \
      --replace-fail 'FF_PROFILE_H264_HIGH' 'AV_PROFILE_H264_HIGH' \
      --replace-fail 'FF_PROFILE_HEVC_MAIN' 'AV_PROFILE_HEVC_MAIN' \
      --replace-fail 'FF_PROFILE_AV1_MAIN' 'AV_PROFILE_AV1_MAIN'
  '';

  env = {
    NIX_CFLAGS_COMPILE = toString [
      "-lbrotlicommon"
@@ -111,6 +121,7 @@ rustPlatform.buildRustPackage rec {
    libva
    libvdpau
    libxkbcommon
    openapv
    openssl
    openvr
    pipewire