*****************************************************************************/
#include <vlc/vlc.h>
-#include <stdlib.h>
-#include <string.h>
#include <errno.h>
#include <sys/types.h>
-#include <vlc/input.h>
-#include "vlc_video.h"
-#include "charset.h"
+#include <vlc_demux.h>
+#include <vlc_charset.h>
#include "ps.h"
}
}
- psz_vobname = strdup( p_demux->psz_path );
+ asprintf( &psz_vobname, "%s://%s", p_demux->psz_access, p_demux->psz_path );
i_len = strlen( psz_vobname );
- memcpy( psz_vobname + i_len - 4, ".sub", 4 );
+ if( i_len >= 4 ) memcpy( psz_vobname + i_len - 4, ".sub", 4 );
/* open file */
p_sys->p_vobsub_stream = stream_UrlNew( p_demux, psz_vobname );
return( VLC_EGENERIC );
}
- if( *line == 0 || *line == '\r' || *line == '\n' || *line == '#' )
+ if( *line == 0 || *line == '\r' || *line == '\n' || *line == '#' )
continue;
else if( !strncmp( "size:", line, 5 ) )
{
/* Store the palette of the subs */
if( sscanf( line, "palette: %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x, %x",
- &p_sys->palette[0], &p_sys->palette[1], &p_sys->palette[2], &p_sys->palette[3],
- &p_sys->palette[4], &p_sys->palette[5], &p_sys->palette[6], &p_sys->palette[7],
- &p_sys->palette[8], &p_sys->palette[9], &p_sys->palette[10], &p_sys->palette[11],
+ &p_sys->palette[0], &p_sys->palette[1], &p_sys->palette[2], &p_sys->palette[3],
+ &p_sys->palette[4], &p_sys->palette[5], &p_sys->palette[6], &p_sys->palette[7],
+ &p_sys->palette[8], &p_sys->palette[9], &p_sys->palette[10], &p_sys->palette[11],
&p_sys->palette[12], &p_sys->palette[13], &p_sys->palette[14], &p_sys->palette[15] ) == 16 )
{
for( i = 0; i < 16; i++ )
ms ) * 1000;
current_tk->i_delay = current_tk->i_delay + (i_gap * i_sign);
- msg_Dbg( p_demux, "sign: %+d gap: %+lld global delay: %+lld", i_sign, i_gap, current_tk->i_delay );
+ msg_Dbg( p_demux, "sign: %+d gap: %+lld global delay: %+lld",
+ i_sign, (long long)i_gap,
+ (long long)current_tk->i_delay );
}
}
}