diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c index 62abc13808afdc16a91ac2627b76fe5cc82fd0e6..0b87c2f2435dfa9e3ff0fd0edb39f5ce78651ca5 100644 --- a/modules/codec/ffmpeg/demux.c +++ b/modules/codec/ffmpeg/demux.c @@ -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; } diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index 7de89dccacff711e95f5367177cb583c4846b1f7..c0683d3d91c308caeb5805a5693d9f3188b5d0b2 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -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 ); diff --git a/modules/codec/ffmpeg/video.c b/modules/codec/ffmpeg/video.c index 976f4fa041cad99828c21940cd9c5594afe40cbd..6fe925599c0dad5752f4e761ea4d7ad2fdf98003 100644 --- a/modules/codec/ffmpeg/video.c +++ b/modules/codec/ffmpeg/video.c @@ -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 );