From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B2FCC4323E for ; Wed, 25 May 2022 11:05:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F84868B504; Wed, 25 May 2022 14:05:50 +0300 (EEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4570068B428 for ; Wed, 25 May 2022 14:05:43 +0300 (EEST) Received: by mail-pl1-f173.google.com with SMTP id d22so18246256plr.9 for ; Wed, 25 May 2022 04:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:in-reply-to:references:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=5SvtzIK6qTgPT6uprIe24EpYuOjR99UVx6TylI/cWQ0=; b=j4g6++qc9sJFeMYeF70wc8nj16Q3PwiL/txSq1HT0D9LCwZ5S1Q16PiSY2GPaiYreg NZOEyP4f59n9Emd23caWKnCW9tsMGAK4R2tHVfupAAVaMlQ3Y0kVM5JelFKEwe6Q5/Ol ZlFdIxUFacxLwmGgJ956adWJG2yO0Y+Ux0udDeX/SSBZ/dUMGduQUM/DbPuRaTkUsoFD MKxuHnu0vuvPEpLKg/HVyaNmI/zW1rgcZsaDJUdYg4tJljA8SN6rcTD1YWCilqfe4pRG FkwRDnKyB9L27/p6bZx8rz9L7BCE6/YrX4jt5Pf+ncu35O3SlFgOwBnqYbMLi3qUvDE2 UdUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:in-reply-to:references:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=5SvtzIK6qTgPT6uprIe24EpYuOjR99UVx6TylI/cWQ0=; b=NiGj4jRixz6xtD0tQPZ2Mpk8ZEAzfNRFpEPouVIzXS2JjtwmZWouk3gCZm/7dPwxqS r8Tdl7QokPP6HmysLJW4gRhzkZOswbP+TwESQRTmg94UM1FZkaF/isGnWqcrGxlpGpDi +TMK0ae4/qCy9kMaEVzdrHXeZa+ADeUFNVgLLBzBUuLJx8Uuht8zCSKaZWMZsNDoemPg ehClcHxO+9huyTd5ou+VLxaSYrWclt5S8ag1uFd78C5d+PdA084S7XtQhcph3AA8btxy eROP1x/BqzbTIoBb7kdHMUoeZfmc+861chAE99h/1N28ULlpIkXIuIHlgxqxIYfoxh4G O2Cw== X-Gm-Message-State: AOAM531IH4RBExKvUYHGPY4Vtw65o1Kw71aGG/2Ss0nJAL3uEFmriVyB Mq12m4u68ZE3JM4LstndpOkP31OQIlvPmg== X-Google-Smtp-Source: ABdhPJyizdppxEx8ImnFSO+FfVhZvQeSg4ceHH3B+evVijGJwGj3QPEymGkGoT3tvR7I9CjH9wXjRA== X-Received: by 2002:a17:90b:4fc6:b0:1e0:6535:c7a1 with SMTP id qa6-20020a17090b4fc600b001e06535c7a1mr9942927pjb.168.1653476741162; Wed, 25 May 2022 04:05:41 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id h10-20020a170902f54a00b0015eab1b097dsm9177512plf.22.2022.05.25.04.05.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 May 2022 04:05:40 -0700 (PDT) From: Matt Oliver X-Google-Original-From: Matt Oliver Message-Id: In-Reply-To: References: Date: Wed, 25 May 2022 11:05:39 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v4] libx264: Set min build version to 158 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: softworkz , Matt Oliver , Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Matt Oliver Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS" Setting X264_API_IMPORTS only affects msvc builds and it breaks linking to static builds (although is required for shared builds). This flag is set by x264 in its pkgconfig as required since build 158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019. So this patch updates configure to require a newer x264 build that correctly sets the imports flag. The requirement for 158 is applied for msvc builds only, no change is made for all other cases. Co-authored-by: softworkz Signed-off-by: softworkz Signed-off-by: Matt Oliver --- libx264: Set min build version to 158 I'm submitting this patch on behalf of Matt with his permission. There was agreement that the >= 158 version requirement should be applied to MSVC builds only. v2: restrict the version requirement to msvc builds v3: fix unintended author change v4: add missing braces Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-30%2Fsoftworkz%2Fsubmit_x264_api_imports_matt-v4 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-30/softworkz/submit_x264_api_imports_matt-v4 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/30 Range-diff vs v3: 1: 374130a09e ! 1: 0d1bee35b0 libx264: Set min build version to 158 @@ configure: enabled libvpx && { - require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && - check_cpp_condition libx262 x264.h "X264_MPEG2" +enabled libx264 && check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode && -+ require_cpp_condition libx264 x264.h "X264_BUILD >= 158" || -+ { "$toolchain" != msvc && require_cpp_condition libx264 x264.h "X264_BUILD >= 118"; } ++ { require_cpp_condition libx264 x264.h "X264_BUILD >= 158" || ++ { "$toolchain" != msvc && require_cpp_condition libx264 x264.h "X264_BUILD >= 118"; }; } enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && require_cpp_condition libx265 x265.h "X265_BUILD >= 70" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" configure | 8 +++----- libavcodec/libx264.c | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/configure b/configure index f115b21064..129473c75c 100755 --- a/configure +++ b/configure @@ -6656,11 +6656,9 @@ enabled libvpx && { enabled libwebp && { enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } -enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode || - { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" && - warn "using libx264 without pkg-config"; } } && - require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && - check_cpp_condition libx262 x264.h "X264_MPEG2" +enabled libx264 && check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode && + { require_cpp_condition libx264 x264.h "X264_BUILD >= 158" || + { "$toolchain" != msvc && require_cpp_condition libx264 x264.h "X264_BUILD >= 118"; }; } enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && require_cpp_condition libx265 x265.h "X265_BUILD >= 70" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 4ce3791ae8..14177b3016 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -37,10 +37,6 @@ #include "atsc_a53.h" #include "sei.h" -#if defined(_MSC_VER) -#define X264_API_IMPORTS 1 -#endif - #include #include #include base-commit: b033913d1c5998a29dfd13e9906dd707ff6eff12 -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".