mp4v2: fix build on darwin

This commit is contained in:
Mario Rodas 2021-01-05 23:02:46 -05:00
parent ee433ead67
commit b60acf29f1
2 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,9 @@ stdenv.mkDerivation rec {
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/libmp4v2-c++11.patch?id=203f5a72bc97ffe089b424c47b07dd9eaea35713";
sha256 = "0sbn0il7lmk77yrjyb4f0a3z3h8gsmdkscvz5n9hmrrrhrwf672w";
})
] ++ stdenv.lib.optionals stdenv.cc.isClang [
# unbreak build with Clang≥6 (C++14 by default). Based on https://reviews.freebsd.org/rP458678
./fix-build-clang.patch
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];

View File

@ -0,0 +1,13 @@
diff --git a/src/mp4.cpp b/src/mp4.cpp
index c2a7238..9bb3e38 100644
--- a/src/mp4.cpp
+++ b/src/mp4.cpp
@@ -870,7 +870,7 @@ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* file
}
catch (...) {
- return MP4_INVALID_TRACK_ID;
+ return NULL;
}
}