Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOneric <oneric@oneric.de>2022-03-23 22:43:54 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-07 17:27:00 +0300
commit4641d71fb05618cf967e215d6c06d53f30a47a03 (patch)
tree593a50e56e0e424035089df9b36e02dfb4d40a4c /libavfilter
parent7b9ee6a49e8b4441a92612dabe9d13b461741696 (diff)
avfilter/vf_subtitles: pass storage size to libass
Due to a quirk of the ASS format some tags depend on the exact storage resolution of the video, so tell libass via ass_set_storage_size.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_subtitles.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index a7b02461f2..2f0608ad90 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -145,9 +145,16 @@ static int config_input(AVFilterLink *inlink)
ff_draw_init(&ass->draw, inlink->format, ass->alpha ? FF_DRAW_PROCESS_ALPHA : 0);
ass_set_frame_size (ass->renderer, inlink->w, inlink->h);
- if (ass->original_w && ass->original_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);
+#if LIBASS_VERSION > 0x01010000
+ ass_set_storage_size(ass->renderer, ass->original_w, ass->original_h);
+ } else {
+ ass_set_storage_size(ass->renderer, inlink->w, inlink->h);
+#endif
+ }
+
if (ass->shaping != -1)
ass_set_shaper(ass->renderer, ass->shaping);