msg_Dbg( p_demux, " - format = %s (%s)",
p_sys->fmt->name, p_sys->fmt->long_name );
msg_Dbg( p_demux, " - start time = "I64Fd,
- ( p_sys->ic->start_time != AV_NOPTS_VALUE ) ?
+ ( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->start_time * 1000000 / AV_TIME_BASE : -1 );
msg_Dbg( p_demux, " - duration = "I64Fd,
- ( p_sys->ic->duration != AV_NOPTS_VALUE ) ?
+ ( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 );
return VLC_SUCCESS;
memcpy( p_frame->p_buffer, pkt.data, pkt.size );
- i_start_time = ( p_sys->ic->start_time != AV_NOPTS_VALUE ) ?
+ i_start_time = ( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->start_time : 0;
- p_frame->i_dts = ( pkt.dts == AV_NOPTS_VALUE ) ?
+ p_frame->i_dts = ( pkt.dts == (int64_t)AV_NOPTS_VALUE ) ?
0 : (pkt.dts - i_start_time) * 1000000 *
p_sys->ic->streams[pkt.stream_index]->time_base.num /
p_sys->ic->streams[pkt.stream_index]->time_base.den;
- p_frame->i_pts = ( pkt.pts == AV_NOPTS_VALUE ) ?
+ p_frame->i_pts = ( pkt.pts == (int64_t)AV_NOPTS_VALUE ) ?
0 : (pkt.pts - i_start_time) * 1000000 *
p_sys->ic->streams[pkt.stream_index]->time_base.num /
p_sys->ic->streams[pkt.stream_index]->time_base.den;
*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 != (int64_t)AV_NOPTS_VALUE) && (p_sys->i_pcr > 0) )
{
*pf = (double)p_sys->i_pcr / (double)p_sys->ic->duration;
}
int64_t i_size = stream_Size( p_demux->s );
i64 = p_sys->i_pcr * i_size / i64 * f;
- if( p_sys->ic->start_time != AV_NOPTS_VALUE )
+ if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE )
i64 += p_sys->ic->start_time;
- if( p_sys->ic->duration != AV_NOPTS_VALUE )
+ if( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE )
i64 = p_sys->ic->duration * f;
msg_Warn( p_demux, "DEMUX_SET_POSITION: "I64Fd, i64 );
case DEMUX_GET_LENGTH:
pi64 = (int64_t*)va_arg( args, int64_t * );
- if( p_sys->ic->duration != AV_NOPTS_VALUE )
+ if( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE )
{
*pi64 = p_sys->ic->duration;
}
case DEMUX_SET_TIME:
i64 = (int64_t)va_arg( args, int64_t );
- if( p_sys->ic->start_time != AV_NOPTS_VALUE )
+ if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE )
i64 += p_sys->ic->start_time;
msg_Warn( p_demux, "DEMUX_SET_TIME: "I64Fd, i64 );
if( p_enc->fmt_in.video.i_aspect > 0 )
{
int64_t i_num, i_den;
- int i_dst_num, i_dst_den;
+ unsigned int i_dst_num, i_dst_den;
i_num = p_enc->fmt_in.video.i_aspect *
(int64_t)p_enc->fmt_in.video.i_height;
int32_t i_hash;
InitMD5( &md5 );
- AddMD5( &md5, (uint8_t *)p_sys_key, 16 );
- AddMD5( &md5, (uint8_t *)p_secret1, 4 );
+ AddMD5( &md5, (const uint8_t *)p_sys_key, 16 );
+ AddMD5( &md5, (const uint8_t *)p_secret1, 4 );
EndMD5( &md5 );
p_secret1[ 3 ]++;
{
p_big_bordel[ i ] = U32_AT(p_bordel + i);
}
- AddMD5( &md5, (uint8_t *)p_big_bordel, 64 );
+ AddMD5( &md5, (const uint8_t *)p_big_bordel, 64 );
if( p_shuffle->i_version == 0x01000300 )
{
- AddMD5( &md5, (uint8_t *)p_secret3, sizeof(p_secret3) );
- AddMD5( &md5, (uint8_t *)p_secret4, i_secret );
+ AddMD5( &md5, (const uint8_t *)p_secret3, sizeof(p_secret3) );
+ AddMD5( &md5, (const uint8_t *)p_secret4, i_secret );
}
EndMD5( &md5 );
/* Combine our system info hash with additional secret data. The resulting
* MD5 hash will be our system key. */
InitMD5( &md5 );
- AddMD5( &md5, (uint8_t*)p_secret5, 8 );
+ AddMD5( &md5, (const uint8_t*)p_secret5, 8 );
if( !b_ipod )
{
- AddMD5( &md5, (uint8_t *)p_system_hash, 6 );
- AddMD5( &md5, (uint8_t *)p_system_hash, 6 );
- AddMD5( &md5, (uint8_t *)p_system_hash, 6 );
- AddMD5( &md5, (uint8_t *)p_secret6, 8 );
+ AddMD5( &md5, (const uint8_t *)p_system_hash, 6 );
+ AddMD5( &md5, (const uint8_t *)p_system_hash, 6 );
+ AddMD5( &md5, (const uint8_t *)p_system_hash, 6 );
+ AddMD5( &md5, (const uint8_t *)p_secret6, 8 );
}
else
{
i_ipod_id = U64_AT(&i_ipod_id);
- AddMD5( &md5, (uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
- AddMD5( &md5, (uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
- AddMD5( &md5, (uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
+ AddMD5( &md5, (const uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
+ AddMD5( &md5, (const uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
+ AddMD5( &md5, (const uint8_t *)&i_ipod_id, sizeof(i_ipod_id) );
}
EndMD5( &md5 );
GetVolumeInformation( _T("C:\\"), NULL, 0, &i_serial,
NULL, NULL, NULL, 0 );
- AddMD5( &md5, (uint8_t *)&i_serial, 4 );
+ AddMD5( &md5, (const uint8_t *)&i_serial, 4 );
for( i = 0; i < sizeof(p_reg_keys) / sizeof(p_reg_keys[ 0 ]); i++ )
{
NULL, NULL, p_reg_buf,
&i_size ) == ERROR_SUCCESS )
{
- AddMD5( &md5, (uint8_t *)p_reg_buf, i_size );
+ AddMD5( &md5, (const uint8_t *)p_reg_buf, i_size );
}
free( p_reg_buf );
p_str = calloc( sizeof( char ), __MIN( strlen( (char*)p_peek ), i_read )+1);\
memcpy( p_str, p_peek, __MIN( strlen( (char*)p_peek ), i_read ) ); \
p_str[__MIN( strlen( (char*)p_peek ), i_read )] = 0; \
- p_peek += strlen( p_str ) + 1; \
- i_read -= strlen( p_str ) + 1; \
+ p_peek += strlen( (char *)p_str ) + 1; \
+ i_read -= strlen( (char *)p_str ) + 1; \
} \
else \
{ \
i_out_bytes = i_in_bytes * sizeof( uint32_t );
i_out_bytes_left = i_out_bytes;
p_out_buffer = (char *)psz_unicode;
- i_ret = vlc_iconv( iconv_handle, &p_in_buffer, &i_in_bytes,
+ i_ret = vlc_iconv( iconv_handle, (const char**)&p_in_buffer, &i_in_bytes,
&p_out_buffer, &i_out_bytes_left );
vlc_iconv_close( iconv_handle );
{
uint32_t *p_fribidi_string;
int start_pos, pos = 0;
-
+
p_fribidi_string = malloc( (i_string_length + 1) * sizeof(uint32_t) );
/* Do bidi conversion line-by-line */
decoder_t *p_decoder;
image_handler_t *p_image; /* filter for resizing */
int i_height, i_width;
- int i_sar_num, i_sar_den;
+ unsigned int i_sar_num, i_sar_den;
char *psz_id;
vlc_bool_t b_inited;
};
AVCodec *ff_enc;
AVCodecContext *ff_enc_c;
AVFrame *p_frame;
- char *p_buffer_out;
+ uint8_t *p_buffer_out;
int i_nb_pred;
int16_t *p_samples;
};
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
char psz_buffer[10];
- int i_len = net_ReadNonBlock( p_stream, p_sys->i_fd, NULL, (char *)&psz_buffer[0],
+ int i_len = net_ReadNonBlock( p_stream, p_sys->i_fd, NULL, (uint8_t *)&psz_buffer[0],
sizeof( psz_buffer ), 0 );
if ( i_len > 0 )
{
SDL_Event event; /* SDL event */
vlc_value_t val;
- int i_width, i_height, i_x, i_y;
+ unsigned int i_width, i_height, i_x, i_y;
/* Process events */
while( SDL_PollEvent(&event) )
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
- int x, y, w, h;
+ unsigned int x, y, w, h;
SDL_Rect disp;
vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
static void SwapBuffers( vout_thread_t *p_vout )
{
vout_sys_t *p_sys = p_vout->p_sys;
- int i_width, i_height, i_x, i_y;
+ unsigned int i_width, i_height, i_x, i_y;
vout_PlacePicture( p_vout, p_vout->p_sys->p_win->i_width,
p_vout->p_sys->p_win->i_height,