mirror of https://github.com/mpv-player/mpv
572802e866
Lua scripts can call osd_set_external() early (before the VO window is created and obj->vo_res is filled), in which case the PlayResX field would be set to nonsense, and libass would print a pointless warning. There's an easy and a hard fix: either just go on and pass dummy values to libass (basically like before, just clamp them to avoid the values which make libass print the warning). Or attempt to update the PlayRes field to correct values on rendering (since at rendering time, you always know the screen size and the correct values). Do the latter. Since various things use PlayRes for scaling things, this might still not be fully ideal. This is a general problem with the async scripting interface. |
||
---|---|---|
.. | ||
ass_mp.c | ||
ass_mp.h | ||
dec_sub.c | ||
dec_sub.h | ||
draw_bmp.c | ||
draw_bmp.h | ||
filter_sdh.c | ||
img_convert.c | ||
img_convert.h | ||
lavc_conv.c | ||
osd.c | ||
osd.h | ||
osd_dummy.c | ||
osd_font.otf | ||
osd_libass.c | ||
osd_state.h | ||
sd.h | ||
sd_ass.c | ||
sd_lavc.c |