ffmpeg: apply binutils patch only to ffmpeg_4

This commit is contained in:
jopejoe1
2024-03-09 16:42:01 +01:00
parent 05454a1bba
commit 71b47cb872
2 changed files with 6 additions and 8 deletions

View File

@@ -7,6 +7,12 @@ import ./generic.nix {
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135";
hash = "sha256-mSnmAkoNikDpxcN+A/hpB7mUbbtcMvm4tG6gZFuroe8=";
}
{
# Backport fix for binutils-2.41.
name = "binutils-2.41.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE=";
}
# The upstream patch isnt for ffmpeg 4, but it will apply with a few tweaks.
# Fixes a crash when built with clang 16 due to UB in ff_seek_frame_binary.
{

View File

@@ -363,14 +363,6 @@ stdenv.mkDerivation (finalAttrs: {
'';
patches = map (patch: fetchpatch patch) (extraPatches
++ (lib.optional (lib.versionOlder version "6.1")
{
# Backport fix for binutils-2.41.
name = "binutils-2.41.patch";
url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE=";
}
)
++ (lib.optional (lib.versionAtLeast finalAttrs.version "6" && lib.versionOlder finalAttrs.version "6.1")
{ # this can be removed post 6.1
name = "fix_aacps_tablegen";