case MVLC_FLOAT:
f = config_GetFloat( p_intf, m->param1 );
div = lldiv( f * 1000000 , 1000000 );
- sprintf( value, I64Fd".%06u", div.quot,
+ sprintf( value, "%lld.%06u", div.quot,
(unsigned int)div.rem );
break;
case MVLC_STRING:
{
char psz_value[20];
lldiv_t value = lldiv( val.f_float * 1000000, 1000000 );
- snprintf( psz_value, sizeof(psz_value), I64Fd".%06u",
+ snprintf( psz_value, sizeof(psz_value), "%lld.%06u",
value.quot, (unsigned int)value.rem );
E_(SSPush)( st, psz_value );
break;
char psz_string[20];
lldiv_t value = lldiv( config_GetFloat( p_intf, psz_variable )
* 1000000, 1000000 );
- snprintf( psz_string, sizeof(psz_string), I64Fd".%06u",
+ snprintf( psz_string, sizeof(psz_string), "%lld.%06u",
value.quot, (unsigned int)value.rem );
E_(SSPush)( st, psz_string );
break;
psz_val = vlc_input_item_GetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_TITLE) );
if( psz_val == NULL )
- psz_val == strdup( p_item->psz_name );
+ psz_val = strdup( p_item->psz_name );
}
else if( !strcmp( psz_meta, "ALBUM" ) )
{
#define MP4_GETSTRINGZ( p_str ) \
if( ( i_read > 0 )&&(p_peek[0] ) ) \
{ \
- p_str = calloc( sizeof( char ), __MIN( strlen( p_peek ), i_read )+1);\
- memcpy( p_str, p_peek, __MIN( strlen( p_peek ), i_read ) ); \
- p_str[__MIN( strlen( p_peek ), i_read )] = 0; \
+ 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; \
} \
#define MP4_READBOX_ENTER( MP4_Box_data_TYPE_t ) \
- int64_t i_read = p_box->i_size; \
+ uint64_t i_read = p_box->i_size; \
uint8_t *p_peek, *p_buff; \
- i_read = p_box->i_size; \
+ int i_actually_read; \
if( !( p_peek = p_buff = malloc( i_read ) ) ) \
{ \
return( 0 ); \
} \
- if( stream_Read( p_stream, p_peek, i_read ) < i_read )\
+ i_actually_read = stream_Read( p_stream, p_peek, i_read ); \
+ if( i_actually_read < 0 || (uint64_t)i_actually_read < i_read )\
{ \
free( p_buff ); \
return( 0 ); \
FREENULL( p_box->data.p_ctts->i_sample_offset );
}
-static int MP4_ReadLengthDescriptor( uint8_t **pp_peek, int64_t *i_read )
+static int MP4_ReadLengthDescriptor( uint8_t **pp_peek, uint64_t *i_read )
{
unsigned int i_b;
unsigned int i_len = 0;
static int MP4_ReadBox_0xa9xxx( stream_t *p_stream, MP4_Box_t *p_box )
{
- int16_t i_length, i_dummy;
+ uint16_t i_length, i_dummy;
MP4_READBOX_ENTER( MP4_Box_data_0xa9xxx_t );
uint8_t i_version;
uint32_t i_flags;
- unsigned char *psz_location;
+ char *psz_location;
} MP4_Box_data_url_t;
uint8_t i_version;
uint32_t i_flags;
- unsigned char *psz_name;
- unsigned char *psz_location;
+ char *psz_name;
+ char *psz_location;
} MP4_Box_data_urn_t;
/* 1 pad bit */
unsigned char i_language[3];
- unsigned char *psz_notice;
+ char *psz_notice;
} MP4_Box_data_cprt_t;
while( (psz_line = stream_ReadLine( p_demux->s )) )
{
- playlist_item_t *p_item;
char **ppsz_options = NULL;
int i, i_options = 0;
char *psz_name = NULL;
int E_(Import_GVP)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- int i_size;
byte_t *p_peek;
CHECK_PEEK( p_peek, 12 );
( psz_base || ( psz_rt && psz_load &&
( p_sys->b_adult || strcmp( psz_rt, "NC17" ) ) ) ) )
{
- playlist_item_t *p_item;
char *psz_mrl = NULL;
if( psz_rt || psz_load )
{
}
{
- char *p_in_buffer, *p_out_buffer;
+ char *p_out_buffer;
+ const char *p_in_buffer = psz_string;
size_t i_in_bytes, i_out_bytes, i_out_bytes_left, i_ret;
i_in_bytes = strlen( psz_string );
i_out_bytes = i_in_bytes * sizeof( uint32_t );
i_out_bytes_left = i_out_bytes;
- p_in_buffer = psz_string;
p_out_buffer = (char *)psz_unicode;
i_ret = vlc_iconv( iconv_handle, &p_in_buffer, &i_in_bytes,
&p_out_buffer, &i_out_bytes_left );
lldiv_t dout = lldiv( p_playlist->p_stats->f_output_bitrate * 1000000,
1000 );
fprintf( p_intf->p_sys->p_rrd,
- I64Fi":"I64Fd".%03u:"I64Fd".%03u:"I64Fd".%03u\n",
+ I64Fi":%lld.%03u:%lld.%03u:%lld.%03u\n",
p_intf->p_sys->last_update/1000000,
din.quot, (unsigned int)din.rem,
ddm.quot, (unsigned int)ddm.rem,
if( p_media->i_length > 0 )
{
lldiv_t d = lldiv( p_media->i_length / 1000, 1000 );
- p += sprintf( p, "a=range:npt=0-"I64Fd".%03u\r\n", d.quot,
+ p += sprintf( p, "a=range:npt=0-%lld.%03u\r\n", d.quot,
(unsigned)d.rem );
}
uint8_t *p_v = p_src->V_PIXELS;
vlc_bool_t b_hscale; /* horizontal scaling type */
- unsigned int i_vscale; /* vertical scaling type */
+ int i_vscale; /* vertical scaling type */
unsigned int i_x, i_y; /* horizontal and vertical indexes */
unsigned int i_real_y; /* y % 4 */
int i_right_margin;