set_capability( "demux", 0 )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_DEMUX )
- add_float( "sub-fps", 0.0, NULL,
+ add_float( "sub-fps", 0.0,
N_("Frames per second"),
SUB_FPS_LONGTEXT, true )
- add_integer( "sub-delay", 0, NULL,
+ add_integer( "sub-delay", 0,
N_("Subtitles delay"),
SUB_DELAY_LONGTEXT, true )
- add_string( "sub-type", "auto", NULL, N_("Subtitles format"),
+ add_string( "sub-type", "auto", N_("Subtitles format"),
SUB_TYPE_LONGTEXT, true )
change_string_list( ppsz_sub_type, NULL, NULL )
- add_string( "sub-description", NULL, NULL, N_("Subtitles description"),
+ add_string( "sub-description", NULL, N_("Subtitles description"),
SUB_DESCRIPTION_LONGTEXT, true )
set_callbacks( Open, Close )
static int Demux( demux_t * );
static int Control( demux_t *, int, va_list );
-/*static void Fix( demux_t * );*/
+static void Fix( demux_t * );
/*****************************************************************************
* Module initializer
p_sys->i_type == SUB_TYPE_SSA2_4 ||
p_sys->i_type == SUB_TYPE_ASS )
{
+ Fix( p_demux );
es_format_Init( &fmt, SPU_ES, VLC_CODEC_SSA );
}
else
/*****************************************************************************
* Fix: fix time stamp and order of subtitle
*****************************************************************************/
-#ifdef USE_THIS_UNUSED_PIECE_OF_CODE
static void Fix( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
bool b_done;
- int i_index;
/* *** fix order (to be sure...) *** */
/* We suppose that there are near in order and this durty bubble sort
do
{
b_done = true;
- for( i_index = 1; i_index < p_sys->i_subtitles; i_index++ )
+ for( int i_index = 1; i_index < p_sys->i_subtitles; i_index++ )
{
if( p_sys->subtitle[i_index].i_start <
- p_sys->subtitle[i_index - 1].i_start )
+ p_sys->subtitle[i_index - 1].i_start )
{
subtitle_t sub_xch;
memcpy( &sub_xch,
}
} while( !b_done );
}
-#endif
static int TextLoad( text_t *txt, stream_t *s )
{