- /* Create a new subpicture region */
- memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = VLC_CODEC_TEXT;
- fmt.i_aspect = 0;
- fmt.i_width = fmt.i_height = 0;
- fmt.i_x_offset = fmt.i_y_offset = 0;
- p_spu->p_region = subpicture_region_New( &fmt );
- if( !p_spu->p_region )
- {
- msg_Err( p_dec, "cannot allocate SPU region" );
- free( psz_subtitle );
- free( psz_html );
- decoder_DeleteSubpicture( p_dec, p_spu );
- return NULL;
- }
-
- /* Decode and format the subpicture unit */
- /* Normal text subs, easy markup */
- p_spu->p_region->i_align = SUBPICTURE_ALIGN_BOTTOM;// | SUBPICTURE_ALIGN_LEFT;// | p_sys->i_align;
- p_spu->p_region->i_x = 0; //p_sys->i_align ? 20 : 0;
- p_spu->p_region->i_y = 10;