[vlc-devel] commit: quartztext: fontsizes of <=0 are not useful. use 12 as fallback. ( Derk-Jan Hartman )

git version control git at videolan.org
Fri Jun 26 16:17:20 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Fri Jun 26 14:54:06 2009 +0200| [770f625ac99dc365e25a89906b235ecdd5a3d23a] | committer: Derk-Jan Hartman 

quartztext: fontsizes of <=0 are not useful. use 12 as fallback.

This fixes using marq and rss filter with default options on Mac OS X.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=770f625ac99dc365e25a89906b235ecdd5a3d23a
---

 modules/misc/quartztext.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/misc/quartztext.c b/modules/misc/quartztext.c
index 4e80fa8..ea05219 100644
--- a/modules/misc/quartztext.c
+++ b/modules/misc/quartztext.c
@@ -423,6 +423,15 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     if( !i_font_alpha ) i_font_alpha = 255 - p_sys->i_font_opacity;
 
+    if( i_font_size <= 0 )
+    {
+        msg_Warn( p_filter, "invalid fontsize, using 12" );
+        if( VLC_SUCCESS == var_Get( p_filter, "scale", &val ))
+            i_font_size = 12 * val.i_int / 1000;
+        else
+            i_font_size = 12;
+    }
+
     ConvertToUTF16( EliminateCRLF( psz_string ), &i_string_length, &psz_utf16_str );
 
     p_region_out->i_x = p_region_in->i_x;




More information about the vlc-devel mailing list