[vlc-commits] Fixed AR returned by various text renderer.
Laurent Aimar
git at videolan.org
Tue Apr 26 21:52:05 CEST 2011
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Apr 26 21:18:39 2011 +0200| [ed1d9723ae7f0b4fb4a3321fab8d3d8877cf8d43] | committer: Laurent Aimar
Fixed AR returned by various text renderer.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed1d9723ae7f0b4fb4a3321fab8d3d8877cf8d43
---
modules/misc/text_renderer/freetype.c | 4 ++++
modules/misc/text_renderer/quartztext.c | 2 ++
modules/misc/text_renderer/win32text.c | 2 ++
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/misc/text_renderer/freetype.c b/modules/misc/text_renderer/freetype.c
index a6f407b..37ed937 100644
--- a/modules/misc/text_renderer/freetype.c
+++ b/modules/misc/text_renderer/freetype.c
@@ -551,6 +551,8 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
if( p_region->fmt.i_visible_height > 0 )
fmt.i_visible_height = p_region->fmt.i_visible_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
+ fmt.i_sar_num = 1;
+ fmt.i_sar_den = 1;
assert( !p_region->p_picture );
p_region->p_picture = picture_NewFromFormat( &fmt );
@@ -816,6 +818,8 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
if( p_region->fmt.i_visible_height > 0 )
fmt.i_visible_height = p_region->fmt.i_visible_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
+ fmt.i_sar_num = 1;
+ fmt.i_sar_den = 1;
p_region->p_picture = picture_NewFromFormat( &fmt );
if( !p_region->p_picture )
diff --git a/modules/misc/text_renderer/quartztext.c b/modules/misc/text_renderer/quartztext.c
index bf1dcde..a0efdae 100644
--- a/modules/misc/text_renderer/quartztext.c
+++ b/modules/misc/text_renderer/quartztext.c
@@ -1038,6 +1038,8 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
fmt.i_width = fmt.i_visible_width = i_width;
fmt.i_height = fmt.i_visible_height = __MIN( i_height, i_textblock_height + VERTICAL_MARGIN * 2);
fmt.i_x_offset = fmt.i_y_offset = 0;
+ fmt.i_sar_num = 1;
+ fmt.i_sar_den = 1;
p_region->p_picture = picture_NewFromFormat( &fmt );
if( !p_region->p_picture )
diff --git a/modules/misc/text_renderer/win32text.c b/modules/misc/text_renderer/win32text.c
index 2c0a363..6e88c37 100644
--- a/modules/misc/text_renderer/win32text.c
+++ b/modules/misc/text_renderer/win32text.c
@@ -226,6 +226,8 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
fmt.i_width = fmt.i_visible_width = i_width + (b_outline ? 4 : 0);
fmt.i_height = fmt.i_visible_height = i_height + (b_outline ? 4 : 0);
fmt.i_x_offset = fmt.i_y_offset = 0;
+ fmt.i_sar_num = 1;
+ fmt.i_sar_den = 1;
/* Build palette */
fmt.p_palette = calloc( 1, sizeof(*fmt.p_palette) );
More information about the vlc-commits
mailing list