- if ( p_vout->pf_add_string )
- {
- p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, i_hmargin,
- i_vmargin, i_start, i_stop );
- }
- else
+ subpicture_t *p_spu;
+ video_format_t fmt;
+ /* (void)p_style; FIXME: <-- why ask for this if it's unused?!? */
+
+ if( !psz_string ) return VLC_EGENERIC;
+
+ p_spu = spu_CreateSubpicture( p_vout->p_spu );
+ if( !p_spu ) return VLC_EGENERIC;
+
+ /* Create a new subpicture region */
+ memset( &fmt, 0, sizeof(video_format_t) );
+ fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+ fmt.i_aspect = 0;
+ fmt.i_width = fmt.i_height = 0;
+ fmt.i_x_offset = fmt.i_y_offset = 0;
+ p_spu->p_region = p_spu->pf_create_region( VLC_OBJECT(p_vout), &fmt );
+ if( !p_spu->p_region )