Commit f407de16 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fix compiler warnings (mismatch in datatypes)

parent 50491f17
......@@ -338,7 +338,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*pf = (double)stream_Tell( p_demux->s ) / (double)i64;
}
if( p_sys->ic->duration != AV_NOPTS_VALUE && p_sys->i_pcr > 0 )
if( (p_sys->ic->duration != AV_NOPTS_VALUE) && (p_sys->i_pcr > 0) )
{
*pf = (double)p_sys->i_pcr / (double)p_sys->ic->duration;
}
......
......@@ -44,7 +44,7 @@
#endif
#if LIBAVCODEC_BUILD < 4704
# define AV_NOPTS_VALUE 0
# define AV_NOPTS_VALUE (int64_t)0
#endif
#if LIBAVCODEC_BUILD < 4684
# define FF_QP2LAMBDA 118
......@@ -877,7 +877,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
#endif
/* End work-around */
i_out = avcodec_encode_video( p_sys->p_context, p_sys->p_buffer_out,
i_out = avcodec_encode_video( p_sys->p_context, (uint8_t*)p_sys->p_buffer_out,
AVCODEC_MAX_VIDEO_FRAME_SIZE, &frame );
if( i_out > 0 )
......@@ -968,7 +968,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
encoder_sys_t *p_sys = p_enc->p_sys;
block_t *p_block, *p_chain = NULL;
char *p_buffer = p_aout_buf->p_buffer;
uint8_t *p_buffer = p_aout_buf->p_buffer;
int i_samples = p_aout_buf->i_nb_samples;
int i_samples_delay = p_sys->i_samples_delay;
......@@ -1001,7 +1001,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
p_samples = (int16_t *)p_buffer;
}
i_out = avcodec_encode_audio( p_sys->p_context, p_sys->p_buffer_out,
i_out = avcodec_encode_audio( p_sys->p_context, (uint8_t *)p_sys->p_buffer_out,
2 * AVCODEC_MAX_AUDIO_FRAME_SIZE,
p_samples );
......
......@@ -517,7 +517,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
i_used = avcodec_decode_video( p_sys->p_context, p_sys->p_ff_pic,
&b_gotpicture,
p_sys->p_buffer, p_sys->i_buffer );
(uint8_t*)p_sys->p_buffer, p_sys->i_buffer );
if( b_null_size && p_sys->p_context->width > 0 &&
p_sys->p_context->height > 0 )
{
......@@ -526,7 +526,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
p_sys->p_context->hurry_up = 0;
i_used = avcodec_decode_video( p_sys->p_context, p_sys->p_ff_pic,
&b_gotpicture,
p_sys->p_buffer, p_sys->i_buffer );
(uint8_t*)p_sys->p_buffer, p_sys->i_buffer );
}
if( i_used < 0 )
......@@ -725,7 +725,7 @@ static void ffmpeg_InitCodec( decoder_t *p_dec )
/* Now remove all atoms before the SMI one */
if( p_sys->p_context->extradata_size > 0x5a &&
strncmp( &p[0x56], "SMI ", 4 ) )
strncmp( (char*)&p[0x56], "SMI ", 4 ) )
{
uint8_t *psz = &p[0x52];
......@@ -737,7 +737,7 @@ static void ffmpeg_InitCodec( decoder_t *p_dec )
/* FIXME handle 1 as long size */
break;
}
if( !strncmp( &psz[4], "SMI ", 4 ) )
if( !strncmp( (char*)&psz[4], "SMI ", 4 ) )
{
memmove( &p[0x52], psz,
&p[p_sys->p_context->extradata_size] - psz );
......
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