Browse Source

ts: fix invalid casts

pull/68/head
Rémi Denis-Courmont 9 years ago
parent
commit
779c87eaff
  1. 12
      modules/demux/mpeg/ts_pid.c

12
modules/demux/mpeg/ts_pid.c

@ -64,14 +64,16 @@ void ts_pid_list_Release( demux_t *p_demux, ts_pid_list_t *p_list )
struct searchkey struct searchkey
{ {
int16_t i_pid; int16_t i_pid;
ts_pid_t **pp_last; ts_pid_t *const *pp_last;
}; };
static int ts_bsearch_searchkey_Compare( void *key, void *other ) static int ts_bsearch_searchkey_Compare( const void *key, const void *other )
{ {
struct searchkey *p_key = (struct searchkey *) key; struct searchkey *p_key = (void *)key;
ts_pid_t *p_pid = *((ts_pid_t **) other); ts_pid_t *const *pp_pid = other;
p_key->pp_last = (ts_pid_t **) other;
ts_pid_t *p_pid = *pp_pid;
p_key->pp_last = other;
return ( p_key->i_pid >= p_pid->i_pid ) ? p_key->i_pid - p_pid->i_pid : -1; return ( p_key->i_pid >= p_pid->i_pid ) ? p_key->i_pid - p_pid->i_pid : -1;
} }

Loading…
Cancel
Save