[FFmpeg-cvslog] lavfi/vf_subtitles: stop using deprecated ass_set_aspect_ratio()

Anton Khirnov git at videolan.org
Tue Dec 7 12:18:19 EET 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Nov 25 11:52:55 2021 +0100| [177a328c7c7e3a2c10296abf20b0b40207153c76] | committer: Anton Khirnov

lavfi/vf_subtitles: stop using deprecated ass_set_aspect_ratio()

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=177a328c7c7e3a2c10296abf20b0b40207153c76
---

 configure                  | 2 +-
 libavfilter/vf_subtitles.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index a98a18abaa..04f319b197 100755
--- a/configure
+++ b/configure
@@ -6481,7 +6481,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);
 



More information about the ffmpeg-cvslog mailing list