Commit 71d32071 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

get vout: use size_t for the counter

Internal counter is still int due to tab macros.
parent cdc27ca5
...@@ -568,12 +568,12 @@ static inline int input_AddSubtitle( input_thread_t *p_input, const char *psz_ur ...@@ -568,12 +568,12 @@ static inline int input_AddSubtitle( input_thread_t *p_input, const char *psz_ur
static inline vout_thread_t *input_GetVout( input_thread_t *p_input ) static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
{ {
vout_thread_t **pp_vout, *p_vout; vout_thread_t **pp_vout, *p_vout;
unsigned i_vout; size_t i_vout;
if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) ) if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
return NULL; return NULL;
for( unsigned i = 1; i < i_vout; i++ ) for( size_t i = 1; i < i_vout; i++ )
vlc_object_release( (vlc_object_t *)(pp_vout[i]) ); vlc_object_release( (vlc_object_t *)(pp_vout[i]) );
p_vout = (i_vout >= 1) ? pp_vout[0] : NULL; p_vout = (i_vout >= 1) ? pp_vout[0] : NULL;
......
...@@ -427,7 +427,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -427,7 +427,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
case INPUT_GET_VOUTS: case INPUT_GET_VOUTS:
{ {
vout_thread_t ***ppp_vout = (vout_thread_t***)va_arg( args, vout_thread_t*** ); vout_thread_t ***ppp_vout = (vout_thread_t***)va_arg( args, vout_thread_t*** );
int *pi_vout = (int*)va_arg( args, int* ); size_t *pi_vout = va_arg( args, size_t * );
input_resource_HoldVouts( p_input->p->p_resource, ppp_vout, pi_vout ); input_resource_HoldVouts( p_input->p->p_resource, ppp_vout, pi_vout );
if( *pi_vout <= 0 ) if( *pi_vout <= 0 )
......
...@@ -288,7 +288,9 @@ static vout_thread_t *HoldVout( input_resource_t *p_resource ) ...@@ -288,7 +288,9 @@ static vout_thread_t *HoldVout( input_resource_t *p_resource )
return p_vout; return p_vout;
} }
static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout, int *pi_vout )
static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout,
size_t *pi_vout )
{ {
vout_thread_t **pp_vout; vout_thread_t **pp_vout;
...@@ -300,7 +302,7 @@ static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout, ...@@ -300,7 +302,7 @@ static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout,
if( p_resource->i_vout <= 0 ) if( p_resource->i_vout <= 0 )
goto exit; goto exit;
pp_vout = calloc( p_resource->i_vout, sizeof(*pp_vout) ); pp_vout = malloc( p_resource->i_vout * sizeof(*pp_vout) );
if( !pp_vout ) if( !pp_vout )
goto exit; goto exit;
...@@ -460,10 +462,13 @@ vout_thread_t *input_resource_HoldVout( input_resource_t *p_resource ) ...@@ -460,10 +462,13 @@ vout_thread_t *input_resource_HoldVout( input_resource_t *p_resource )
{ {
return HoldVout( p_resource ); return HoldVout( p_resource );
} }
void input_resource_HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout, int *pi_vout )
void input_resource_HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout,
size_t *pi_vout )
{ {
HoldVouts( p_resource, ppp_vout, pi_vout ); HoldVouts( p_resource, ppp_vout, pi_vout );
} }
void input_resource_TerminateVout( input_resource_t *p_resource ) void input_resource_TerminateVout( input_resource_t *p_resource )
{ {
input_resource_RequestVout( p_resource, NULL, NULL, false ); input_resource_RequestVout( p_resource, NULL, NULL, false );
......
...@@ -81,7 +81,7 @@ vout_thread_t *input_resource_HoldVout( input_resource_t * ); ...@@ -81,7 +81,7 @@ vout_thread_t *input_resource_HoldVout( input_resource_t * );
* *
* You must call vlc_object_release on all values returned (if non NULL). * You must call vlc_object_release on all values returned (if non NULL).
*/ */
void input_resource_HoldVouts( input_resource_t *, vout_thread_t ***, int * ); void input_resource_HoldVouts( input_resource_t *, vout_thread_t ***, size_t * );
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment