From patchwork Thu Nov 25 15:04:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31667 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp848900iob; Thu, 25 Nov 2021 07:06:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqM2ranOImIepcoC2Kv+bIV2isW303XU094B6lI+4GX1O6D/AxgQ4mXKA02YlZS/LwJG7I X-Received: by 2002:a17:906:9744:: with SMTP id o4mr33079505ejy.322.1637852762997; Thu, 25 Nov 2021 07:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637852762; cv=none; d=google.com; s=arc-20160816; b=x0t+Xbn09g/3ogPjcwgai54k4LXD/ijm+feFUq3JWtJBDLGgvhRuanbpCCNOLABwA6 4Ep4nDyUEr0WkvtVlvrarN45fv9/uZlLiRt1J0quZmHFoGKbePwKKxHuA3fT1AApaBBq b3uwrYfv/JrooahxIlN97dQuiE8ojDxqMLRv068UL6ZKdcm+GvDd/BISzaqFj19GGHwI CBKM4/FXmA4oU9XIPjQ0kcMUnkkomoO0+uhIryaFPOcjDS4OtPdE3GF5NkSGcPUb5Gk7 hVfBMZhYpFjXh9MDGVJ0j/HuGdPqKzf/IWDaWFO3x5iYqLC7hhrCHg00RrG2q1xCGCSh 1K6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=tpeOvHePyjNtU9MJX9OHLMotHggLMvq/H61xCcUSkwk=; b=C8W+qc8t4v5Iql5oojWfL2O0KjQGHpu5dNOP87s/Q5iQtK13bQJir5vPM+FgYvqTpr qqb+paD7EP3PHzo+addSydNvEgvLFZTH6N+EVN3DpE9ZA4M7/SEtltQw8hhHlDHGRJbz eDDWwHjruvyCkaOVYGY9SapcIII7uduRa1A40C+hGDHMN+5Q2isE9qcorLysrzdZh9QC Kux9HpM1F6gkes79lEm3ZVdU4o+fhOBnFq/nnkcIdYudnyxRXmq9KwA+EkjzEPCe1owE z9I8+YBQMB7ysTjdKD4cO0P8xqgGnL995smuPLmLLSuvJ60orXbOtVa+AwnGLFBR038K Sxqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gn8si7786645ejc.193.2021.11.25.07.06.02; Thu, 25 Nov 2021 07:06:02 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6CFC868AEA3; Thu, 25 Nov 2021 17:05:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 224D668ADE7 for ; Thu, 25 Nov 2021 17:05:09 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 15D3F24017A for ; Thu, 25 Nov 2021 16:05:08 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id yhCZEFxByNsn for ; Thu, 25 Nov 2021 16:05:06 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 722CD2400F5 for ; Thu, 25 Nov 2021 16:05:06 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id B6B393A0746; Thu, 25 Nov 2021 16:05:05 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Nov 2021 16:04:56 +0100 Message-Id: <20211125150500.25040-5-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211125150500.25040-1-anton@khirnov.net> References: <20211125150500.25040-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/9] lavfi/vf_subtitles: stop using deprecated ass_set_aspect_ratio() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pYqdlbSPfFCK It has been deprecated in favor of ass_set_pixel_aspect() since version 0.11.0, roughly ~2014. Even Debian oldoldstable (stretch) has 0.13. --- configure | 2 +- libavfilter/vf_subtitles.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index d068b11073..4d9000567b 100755 --- a/configure +++ b/configure @@ -6430,7 +6430,7 @@ enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "ar die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 -enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init +enabled libass && require_pkg_config libass "libass >= 0.11.0" ass/ass.h ass_library_init enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 377160c72b..3fc4eeb63d 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -147,8 +147,8 @@ static int config_input(AVFilterLink *inlink) ass_set_frame_size (ass->renderer, inlink->w, inlink->h); if (ass->original_w && ass->original_h) - ass_set_aspect_ratio(ass->renderer, (double)inlink->w / inlink->h, - (double)ass->original_w / ass->original_h); + ass_set_pixel_aspect(ass->renderer, (double)inlink->w / inlink->h / + ((double)ass->original_w / ass->original_h)); if (ass->shaping != -1) ass_set_shaper(ass->renderer, ass->shaping);