]> git.sesse.net Git - vlc/blobdiff - modules/misc/win32text.c
Qt4: compressor and Spatializer widget margin shouldn't be 0
[vlc] / modules / misc / win32text.c
index 89fc5f8db33eda056253c895fa9f3578fe4c2619..e3464674ed26ea50961fd1afe1b8455918d1fc0e 100644 (file)
@@ -240,7 +240,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
         fmt.p_palette->palette[i][3] = pi_gamma[i];
     }
 
-    p_region->p_picture = picture_New( fmt.i_chroma, fmt.i_width, fmt.i_height, fmt.i_aspect );
+    p_region->p_picture = picture_NewFromFormat( &fmt );
     if( !p_region->p_picture )
     {
         free( fmt.p_palette );
@@ -307,6 +307,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     /* Sanity check */
     if( !p_region_in || !p_region_out ) return VLC_EGENERIC;
+    if( !p_region_in->psz_text || !*p_region_in->psz_text )
+        return VLC_EGENERIC;
+
     psz_string = malloc( (strlen( p_region_in->psz_text )+1) * sizeof(TCHAR) );
     if( !psz_string )
         return VLC_ENOMEM;