From 5d95e9d4598961e0aa339cfb34d0da70c6708d54e5c320fb420b3e12d26e1ff7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 14 Mar 2022 13:39:52 +0000 Subject: [PATCH] Reinstate cuda_sdk conditional OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=12 --- ffmpeg-5.changes | 2 +- ffmpeg-5.spec | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ffmpeg-5.changes b/ffmpeg-5.changes index b94c702..43fbac4 100644 --- a/ffmpeg-5.changes +++ b/ffmpeg-5.changes @@ -11,7 +11,7 @@ Thu Mar 10 13:37:06 UTC 2022 - Bjørn Lie - Drop pkgconfig(librtmp) BuildRequires and stop passing conditional --enable-librtmp to configure, built-in RTMP support is better, and has listen mode. -- Drop bcond conditionals for cuda_sdk, libaom, srt, lv2, soxr, +- Drop bcond conditionals for libaom, srt, lv2, soxr, zmq, zimg and openmpt, build unconditionally for all supported versions of openSUSE. - Drop pkgconfig(enca) BuildRequires: Seems unused. diff --git a/ffmpeg-5.spec b/ffmpeg-5.spec index d7f5e37..34da659 100644 --- a/ffmpeg-5.spec +++ b/ffmpeg-5.spec @@ -37,6 +37,17 @@ %preamble_string ffmpeg-private-devel %comparator %conflicts_version \ %nil +%if 0%{?BUILD_ORIG} +%bcond_without cuda_sdk +%else +# If software H264 is disabled, the hw driver must be as well: +# HW drivers can fail to initialize, namely when the hardware is absent. +# Browsers choose video formats on sites like youtube based on `ffmpeg +# -codecs` rather than the success/failure status of libav* initialization. +# This becomes a problem when a format only has a HW driver; +# the browser thinks it can do H264 but never succeeds. +%bcond_with cuda_sdk +%endif %bcond_with amrwb %bcond_with fdk_aac_dlopen %bcond_with opencore @@ -543,6 +554,9 @@ LDFLAGS="%_lto_cflags" \ --enable-ladspa \ %if %{with vulkan} --enable-libshaderc --enable-vulkan \ +%endif +%if !%{with cuda_sdk} + --disable-cuda-sdk \ %endif --enable-libaom \ --enable-libass \