Browse Source

misc: remove unnecessary cast when using vlc_array_item_at_index

vlc_array_item_at_index returns a value of type pointer-to-void,
meaning that the pointer is implicitly convertible to the destination
type (there is no need for the explicit cast).

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
pull/50/head
Filip Roséen 10 years ago
committed by Thomas Guillem
parent
commit
afbbfaad48
  1. 4
      modules/access_output/livehttp.c
  2. 2
      modules/mux/asf.c

4
modules/access_output/livehttp.c

@ -614,7 +614,7 @@ static int updateIndexAndDel( sout_access_out_t *p_access, sout_access_out_sys_t
//scale to i_index_offset..numsegs + i_index_offset
uint32_t index = i - i_firstseg + i_index_offset;
output_segment_t *segment = (output_segment_t *)vlc_array_item_at_index( p_sys->segments_t, index );
output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, index );
if( p_sys->key_uri &&
( !psz_current_uri || strcmp( psz_current_uri, segment->psz_key_uri ) )
)
@ -714,7 +714,7 @@ static void closeCurrentSegment( sout_access_out_t *p_access, sout_access_out_sy
{
if ( p_sys->i_handle >= 0 )
{
output_segment_t *segment = (output_segment_t *)vlc_array_item_at_index( p_sys->segments_t, vlc_array_count( p_sys->segments_t ) - 1 );
output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, vlc_array_count( p_sys->segments_t ) - 1 );
if( p_sys->key_uri )
{

2
modules/mux/asf.c

@ -279,7 +279,7 @@ static void Close( vlc_object_t * p_this )
for( int i = 0; i < vlc_array_count( p_sys->p_tracks ); i++ )
{
asf_track_t *track = (asf_track_t *)vlc_array_item_at_index( p_sys->p_tracks, i );
asf_track_t *track = vlc_array_item_at_index( p_sys->p_tracks, i );
free( track->p_extra );
es_format_Clean( &track->fmt );
free( track );

Loading…
Cancel
Save