]> git.sesse.net Git - vlc/commitdiff
Change the visible heigh/width only if they weren't set in the source text subpicture...
authorAntoine Cellerier <dionoea@videolan.org>
Wed, 21 Mar 2007 22:10:50 +0000 (22:10 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Wed, 21 Mar 2007 22:10:50 +0000 (22:10 +0000)
modules/misc/freetype.c

index d3784f02e1a7a882bd2c51b7979ed8640f37ab86..f1c43f1ae9ebec88ebef6393a2007e88daff48c6 100644 (file)
@@ -408,6 +408,10 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width + 4;
     fmt.i_height = fmt.i_visible_height = i_height + 4;
+    if( p_region->fmt.i_visible_width > 0 )
+        fmt.i_visible_width = p_region->fmt.i_visible_width;
+    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;
     p_region_tmp = spu_CreateRegion( p_filter, &fmt );
     if( !p_region_tmp )
@@ -679,6 +683,10 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width + 6;
     fmt.i_height = fmt.i_visible_height = i_height + 6;
+    if( p_region->fmt.i_visible_width > 0 )
+        fmt.i_visible_width = p_region->fmt.i_visible_width;
+    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;
     p_region_tmp = spu_CreateRegion( p_filter, &fmt );
     if( !p_region_tmp )