-
- /*
- * Initialize the thread properties
- */
- p_spudec->p_vout = NULL;
- p_spudec->p_fifo = p_fifo;
-
- /*
- * Initialize thread and free configuration
- */
- p_spudec->p_fifo->b_error = InitThread( p_spudec );
-
- /*
- * Main loop - it is not executed if an error occured during
- * initialization
- */
- if( p_fifo->i_fourcc == VLC_FOURCC('s','u','b','t') )
- {
- /* Here we are dealing with text subtitles */
-
-#if defined(SYS_DARWIN) || defined(SYS_BEOS)
- if ( (psz_font = config_GetPsz( p_fifo, "spudec-font" )) == NULL )
- {
- char * psz_vlcpath = p_fifo->p_libvlc->psz_vlcpath;
- psz_font = malloc( strlen(psz_vlcpath) + strlen("/share/")
- + strlen(DEFAULT_FONT) + 1 );
- sprintf(psz_font, "%s/share/" DEFAULT_FONT, psz_vlcpath);
- }
-#else
- if( (psz_font = config_GetPsz( p_fifo, "spudec-font" )) == NULL )
- {
- msg_Err( p_fifo, "no default font selected" );
- p_font = NULL;
- p_spudec->p_fifo->b_error;
- }
- else
-#endif
- {
- p_font = E_(subtitler_LoadFont)( p_spudec->p_vout, psz_font );
- if ( p_font == NULL )
- {
- msg_Err( p_fifo, "unable to load font: %s", psz_font );
- p_spudec->p_fifo->b_error;
- }
- }
- if( psz_font ) free( psz_font );
+ p_dec->pf_packetize = Packetize;
+ p_dec->p_sys->b_packetizer = true;
+ es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
+ p_dec->fmt_out.i_codec = VLC_FOURCC( 's','p','u',' ' );