[MPlayer-dev-eng] Fix display of ASS subtitles

Oneric oneric at oneric.de
Sun Feb 27 03:38:54 EET 2022


Some parts of ASS depend on the video’s storage size,
so libass needs to be told about this via ass_set_storage_size
(which is already available in the vendored version in mplayer).
Can be tested on e.g. the files found here:
https://code.videolan.org/videolan/vlc/uploads/b54e0761d0d3f4f79b2947ffb83a3b59/vlc-issue_libass-storage-size.tar.xz



Index: sub/ass_mp.c
===================================================================
--- sub/ass_mp.c	(revision 38348)
+++ sub/ass_mp.c	(working copy)
@@ -340,6 +340,7 @@
 		ass_configure(ass_renderer, res->w, res->h, res->unscaled);
 		ass_set_margins(ass_renderer, res->mt + ass_top_margin, res->mb + ass_bottom_margin, res->ml, res->mr);
 		ass_set_aspect_ratio(ass_renderer, dar, (double)res->srcw / res->srch);
+		ass_set_storage_size(ass_renderer, res->srcw, res->srch);
 		src->initialized = 1;
 		ass_force_reload = 0;
 	}


More information about the MPlayer-dev-eng mailing list