Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d6fe7f78a873
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e4d975931498
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on May 15, 2021

  1. Copy the full SHA
    8f64c5d View commit details

Commits on May 16, 2021

  1. ffmpeg_4: only apply the patch on darwin

    It's not a big deal, but why rebuild the linux dependencies now.
    vcunat committed May 16, 2021
    Copy the full SHA
    3e43d42 View commit details
  2. Copy the full SHA
    e4d9759 View commit details
5 changes: 5 additions & 0 deletions pkgs/development/libraries/ffmpeg/4.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ callPackage
# Darwin frameworks
, Cocoa, CoreMedia, VideoToolbox
, stdenv, lib
, ...
}@args:

@@ -9,4 +10,8 @@ callPackage ./generic.nix (rec {
branch = "4.4";
sha256 = "03kxc29y8190k4y8s8qdpsghlbpmchv1m8iqygq2qn0vfm4ka2a2";
darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ];

/* Work around https://trac.ffmpeg.org/ticket/9242 */
patches = lib.optional stdenv.isDarwin
./v2-0001-avcodec-videotoolboxenc-define-TARGET_CPU_ARM64-t.patch;
} // args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 5b562aaddbc6e7a94a079c2e88230b205a7f4d73 Mon Sep 17 00:00:00 2001
From: Zane van Iperen <zane@zanevaniperen.com>
Date: Sat, 15 May 2021 19:33:52 +1000
Subject: [PATCH v2] avcodec/videotoolboxenc: #define TARGET_CPU_ARM64 to 0 if
not provided by the SDK

Fixes build failure on older SDKs without it.

Fixes #9242

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
---
libavcodec/videotoolboxenc.c | 4 ++++
1 file changed, 4 insertions(+)

NB: This is untested, I do not have a Mac to try it on.

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 58239e0ab9..f063a86e73 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -50,6 +50,10 @@ enum { kCVPixelFormatType_420YpCbCr10BiPlanarFullRange = 'xf20' };
enum { kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = 'x420' };
#endif

+#ifndef TARGET_CPU_ARM64
+# define TARGET_CPU_ARM64 0
+#endif
+
typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc,
size_t parameterSetIndex,
const uint8_t **parameterSetPointerOut,
--
2.29.3