set_callbacks( OpenForce, Close )
add_shortcut( "ps" )
- add_bool( "ps-trust-timestamps", true, NULL, TIME_TEXT,
+ add_bool( "ps-trust-timestamps", true, TIME_TEXT,
TIME_LONGTEXT, true )
change_safe ()
int64_t i_current_pos = -1, i_size = 0, i_end = 0;
int i;
- if( !var_CreateGetInteger( p_demux, "ps-trust-timestamps" ) )
+ if( !var_CreateGetBool( p_demux, "ps-trust-timestamps" ) )
return;
if( p_sys->i_length == -1 ) /* First time */
static block_t *ps_pkt_read( stream_t *s, uint32_t i_code )
{
const uint8_t *p_peek;
- int i_peek = stream_Peek( s, &p_peek, 14 );
- int i_size;
- VLC_UNUSED(i_code);
-
- /* Smallest valid packet */
- if( i_peek < 6 ) return NULL;
+ int i_peek = stream_Peek( s, &p_peek, 14 );
+ if( i_peek < 4 )
+ return NULL;
- i_size = ps_pkt_size( p_peek, i_peek );
-
- if( i_size < 0 || ( i_size <= 6 && p_peek[3] > 0xba ) )
+ int i_size = ps_pkt_size( p_peek, i_peek );
+ if( i_size <= 6 && p_peek[3] > 0xba )
{
/* Special case, search the next start code */
i_size = 6;
return stream_Block( s, i_size );
}
+ VLC_UNUSED(i_code);
return NULL;
}