[vlc-commits] package/apple: fix compilation on ARM-64

2021-02-16 Thread Felix Paul Kühne
vlc | branch: master | Felix Paul Kühne  | Mon Feb 15 13:48:17 
2021 +0100| [a089d8b795d5b77650f697eec9c8192ed6ada906] | committer: Felix Paul 
Kühne

package/apple: fix compilation on ARM-64

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a089d8b795d5b77650f697eec9c8192ed6ada906
---

 extras/package/apple/build.sh | 16 
 1 file changed, 16 insertions(+)

diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh
index 1868c8f1f4..4190938f86 100755
--- a/extras/package/apple/build.sh
+++ b/extras/package/apple/build.sh
@@ -57,6 +57,7 @@ VLC_HOST_ARCH="x86_64"
 # Host platform information
 VLC_HOST_PLATFORM=
 VLC_HOST_TRIPLET=
+VLC_BUILD_TRIPLET=
 # Set to "1" when building for simulator
 VLC_HOST_PLATFORM_SIMULATOR=
 # The host OS name (without the simulator suffix)
@@ -232,6 +233,18 @@ set_host_triplet()
 VLC_HOST_TRIPLET="${triplet_arch}-apple-darwin"
 }
 
+# Set the VLC_BUILD_TRIPLET based on the architecture
+# that we run on.
+# Globals:
+#   VLC_BUILD_TRIPLET
+# Arguments:
+#   None
+set_build_triplet()
+{
+local build_arch="$(uname -m | cut -d. -f1)"
+VLC_BUILD_TRIPLET="$(cc -arch "${build_arch}" -dumpmachine)"
+}
+
 # Take SDK name, verify it exists and populate
 # VLC_HOST_*, VLC_APPLE_SDK_PATH variables based
 # on the SDK and calls the set_deployment_target
@@ -490,6 +503,7 @@ validate_architecture "$VLC_HOST_ARCH"
 
 # Set triplet (needs to be called after validating the arch)
 set_host_triplet "$VLC_HOST_ARCH"
+set_build_triplet
 
 # Set pseudo-triplet
 # FIXME: This should match the actual clang triplet and should be used for 
compiler invocation too!
@@ -603,6 +617,7 @@ write_config_mak "-Werror=partial-availability"
 # Bootstrap contribs
 ../bootstrap \
 --host="$VLC_HOST_TRIPLET" \
+--build="$VLC_BUILD_TRIPLET" \
 --prefix="$VLC_CONTRIB_INSTALL_DIR" \
 "${VLC_CONTRIB_OPTIONS[@]}" \
 || abort_err "Bootstrapping contribs failed"
@@ -680,6 +695,7 @@ mkdir -p "$VLC_INSTALL_DIR"
 hostenv ../../configure \
 --with-contrib="$VLC_CONTRIB_INSTALL_DIR" \
 --host="$VLC_HOST_TRIPLET" \
+--build="$VLC_BUILD_TRIPLET" \
 --prefix="$VLC_INSTALL_DIR" \
 "${VLC_CONFIG_OPTIONS[@]}" \
  || abort_err "Configuring VLC failed"

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: adaptive: do not trust profile/level

2021-02-16 Thread Francois Cartegnie
vlc/vlc-3.0 | branch: master | Francois Cartegnie  | Fri Feb 
12 13:56:24 2021 +0100| [09cc13c481c03a2c4d0cb553d05886b89ab4a91b] | committer: 
Francois Cartegnie

demux: adaptive: do not trust profile/level

refs #25459

(cherry picked from commit d44e8655384a2c5cbbd0b5deb6eb6c1475d4cf5d)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=09cc13c481c03a2c4d0cb553d05886b89ab4a91b
---

 modules/demux/adaptive/plumbing/FakeESOutID.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/adaptive/plumbing/FakeESOutID.cpp 
b/modules/demux/adaptive/plumbing/FakeESOutID.cpp
index c2fb35aeda..cf6f9506b4 100644
--- a/modules/demux/adaptive/plumbing/FakeESOutID.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOutID.cpp
@@ -80,6 +80,10 @@ bool FakeESOutID::isCompatible( const FakeESOutID *p_other ) 
const
 if((fmt.i_extra > 0) ^ (p_other->fmt.i_extra > 0))
 return false;
 
+if(fmt.i_profile != p_other->fmt.i_profile ||
+   fmt.i_level != p_other->fmt.i_level)
+return false;
+
 switch(fmt.i_codec)
 {
 case VLC_CODEC_H264:

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits