comparison libvo/vo_gl.c @ 24787:02535b3216c5

Avoid text deformation and subtitles moving outside the screen in pan-and-scan mode. For this, crop amounts are passed from vo_gl as negative margins sizes. They are used to calculate aspect ratio. They are ignored when calculating subtitle positions, so subtitles will stay on screen most of the time. Based on a patch by Jindrich Makovicka [makovick gmail com].
author eugeni
date Fri, 19 Oct 2007 18:16:23 +0000
parents 9ea121c8e2df
children 3aee342be929
comparison
equal deleted inserted replaced
24786:d901e5dd5647 24787:02535b3216c5
905 mp_eosd_res_t *r = data; 905 mp_eosd_res_t *r = data;
906 r->mt = r->mb = r->ml = r->mr = 0; 906 r->mt = r->mb = r->ml = r->mr = 0;
907 if (scaled_osd) {r->w = image_width; r->h = image_height;} 907 if (scaled_osd) {r->w = image_width; r->h = image_height;}
908 else if (vo_fs) { 908 else if (vo_fs) {
909 r->w = vo_screenwidth; r->h = vo_screenheight; 909 r->w = vo_screenwidth; r->h = vo_screenheight;
910 r->ml = r->mr = ass_border_x > 0 ? ass_border_x : 0; 910 r->ml = r->mr = ass_border_x;
911 r->mt = r->mb = ass_border_y > 0 ? ass_border_y : 0; 911 r->mt = r->mb = ass_border_y;
912 } else { 912 } else {
913 r->w = vo_dwidth; r->h = vo_dheight; 913 r->w = vo_dwidth; r->h = vo_dheight;
914 } 914 }
915 } 915 }
916 return VO_TRUE; 916 return VO_TRUE;