mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
1728ad8293
commit
66901ce162
1 changed files with 5 additions and 1 deletions
|
|
@ -147,9 +147,13 @@ 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_pixel_aspect(ass->renderer, (double)inlink->w / inlink->h /
|
||||
((double)ass->original_w / ass->original_h));
|
||||
ass_set_storage_size(ass->renderer, ass->original_w, ass->original_h);
|
||||
} else
|
||||
ass_set_storage_size(ass->renderer, inlink->w, inlink->h);
|
||||
|
||||
if (ass->shaping != -1)
|
||||
ass_set_shaper(ass->renderer, ass->shaping);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue