diff options
author | wm4 <wm4@nowhere> | 2012-10-18 17:31:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:56:33 +0200 |
commit | 98f74335d509320f19db2da8786273f95cad2a69 (patch) | |
tree | fe0e36c96a26208ea87464a333ed89d056596ddb /libvo/vo_x11.c | |
parent | d5def80afbdc7d20a22f2f630cdd34c60a0b99a9 (diff) | |
download | mpv-98f74335d509320f19db2da8786273f95cad2a69.tar.bz2 mpv-98f74335d509320f19db2da8786273f95cad2a69.tar.xz |
sub: fix text subtitle aspect ratio with vo_xv and vo_lavc, refactor
This fixes that vo_xv didn't display text subtitles correctly when
using anamorphic video. It didn't pass the aspect information to the
subtitle renderer. Also, try to render OSD correctly with respect to
aspect ratio settings: on vo_xv, the OSD is rendered into the video,
and needs to be "stretched" too when playing anamorphic video. When
the -monitorpixelaspect option is used, even with VOs such as vo_opengl
the OSD has to be rendered with that aspect ratio.
As preparation for future commits, replace the weird vsfilter_scale
value with a somewhat more sensible video_par member.
Also, struct mp_eosd_res is a better place for the aspect ratio
parameters, as OSD needs this too.
Use osd_draw_on_image() directly in vo_lavc, which fixes aspect ratio
issues as well.
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r-- | libvo/vo_x11.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 8725279bb8..6ea95527f3 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -43,7 +43,6 @@ #include "sub/sub.h" #include "sub/dec_sub.h" -#include "sub/draw_bmp.h" #include "libmpcodecs/sws_utils.h" #define MODE_RGB 0x1 @@ -446,9 +445,12 @@ static void draw_osd(struct vo *vo, struct osd_state *osd) struct sub_render_params subparams = { .pts = osd->vo_sub_pts, - .dim = {.w = img.w, .h = img.h}, - .normal_scale = 1, - .vsfilter_scale = 1, + .dim = { + .w = img.w, + .h = img.h, + .display_par = vo->monitor_par, + .video_par = vo->aspdat.par, + }, }; osd_draw_on_image(osd, &img, &csp, &subparams); |