* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
-#include <stdio.h>
-#include <stdlib.h> /* malloc(), free() */
#include <vlc_demux.h>
#ifdef ASF_DEBUG
msg_Dbg( s,
- "found object guid: " GUID_FMT " size:"I64Fd,
+ "found object guid: " GUID_FMT " size:%"PRId64,
GUID_PRINT( p_common->i_object_id ),
p_common->i_object_size );
#endif
static void ASF_FreeObject_Null( asf_object_t *pp_obj )
{
+ VLC_UNUSED(pp_obj);
return;
}
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"data object\" file_id:" GUID_FMT " total data packet:"
- I64Fd" reserved:%d",
+ "%"PRId64" reserved:%d",
GUID_PRINT( p_data->i_file_id ),
p_data->i_total_data_packets,
p_data->i_reserved );
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"index object\" file_id:" GUID_FMT
- " index_entry_time_interval:"I64Fd" max_packet_count:%d "
+ " index_entry_time_interval:%"PRId64" max_packet_count:%d "
"index_entry_count:%ld",
GUID_PRINT( p_index->i_file_id ),
p_index->i_index_entry_time_interval,
int i_peek;
const uint8_t *p_peek;
- if( ( i_peek = stream_Peek( s, &p_peek, 104) ) < 104 )
+ if( ( i_peek = stream_Peek( s, &p_peek, 104 ) ) < 104 )
{
return VLC_EGENERIC;
}
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"file properties object\" file_id:" GUID_FMT
- " file_size:"I64Fd" creation_date:"I64Fd" data_packets_count:"
- I64Fd" play_duration:"I64Fd" send_duration:"I64Fd" preroll:"
- I64Fd" flags:%d min_data_packet_size:%d max_data_packet_size:%d "
- "max_bitrate:%d",
+ " file_size:%"PRId64" creation_date:%"PRId64" data_packets_count:"
+ "%"PRId64" play_duration:%"PRId64" send_duration:%"PRId64" preroll:%"PRId64
+ " flags:%d min_data_packet_size:%d "
+ " max_data_packet_size:%d max_bitrate:%d",
GUID_PRINT( p_fp->i_file_id ), p_fp->i_file_size,
p_fp->i_creation_date, p_fp->i_data_packets_count,
p_fp->i_play_duration, p_fp->i_send_duration,
for( i = 0; i < p_meta->i_record_entries_count; i++ )
{
- if( p_meta->record[i].psz_name ) free( p_meta->record[i].psz_name );
- if( p_meta->record[i].p_data ) free( p_meta->record[i].p_data );
+ free( p_meta->record[i].psz_name );
+ free( p_meta->record[i].p_data );
}
- if( p_meta->record ) free( p_meta->record );
+ free( p_meta->record );
}
static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj )
msg_Dbg( s, " - %s (%i bytes)",
p_rec->psz_name, p_rec->i_data );
else
- msg_Dbg( s, " - %s="I64Fd,
+ msg_Dbg( s, " - %s=%"PRId64,
p_rec->psz_name, p_rec->i_val );
}
#endif
#ifdef ASF_DEBUG
msg_Dbg( s,
"read \"stream Properties object\" stream_type:" GUID_FMT
- " error_correction_type:" GUID_FMT " time_offset:"I64Fd
+ " error_correction_type:" GUID_FMT " time_offset:%"PRId64
" type_specific_data_length:%d error_correction_data_length:%d"
" flags:0x%x stream_number:%d",
GUID_PRINT( p_sp->i_stream_type ),
}
#ifdef ASF_DEBUG
- msg_Dbg( s, "read \"language list object\" %d entries",
+ msg_Dbg( s, "read \"language list object\" %d entries",
p_ll->i_language );
for( i = 0; i < p_ll->i_language; i++ )
- msg_Dbg( s, " - '%s'",
+ msg_Dbg( s, " - '%s'",
p_ll->ppsz_language[i] );
#endif
return VLC_SUCCESS;
{
msg_Dbg( s," - stream=%d bitrate=%d",
p_sb->bitrate[i].i_stream_number,
- p_sb->bitrate[i].i_avg_bitrate );
+ p_sb->bitrate[i].i_avg_bitrate );
}
#endif
return VLC_SUCCESS;
asf_object_t *p_sp;
/* Cannot fail as peek succeed */
stream_Read( s, NULL, p_data - p_peek );
-
+
p_sp = malloc( sizeof( asf_object_t ) );
if( ASF_ReadObject( s, p_sp, NULL ) )
#ifdef ASF_DEBUG
msg_Dbg( s, "read \"extended stream properties object\":" );
- msg_Dbg( s, " - start="I64Fd" end="I64Fd,
+ msg_Dbg( s, " - start=%"PRId64" end=%"PRId64,
p_esp->i_start_time, p_esp->i_end_time );
msg_Dbg( s, " - data bitrate=%d buffer=%d initial fullness=%d",
p_esp->i_data_bitrate,
msg_Dbg( s, " - flags=0x%x", p_esp->i_flags );
msg_Dbg( s, " - stream number=%d language=%d",
p_esp->i_stream_number, p_esp->i_language_index );
- msg_Dbg( s, " - average time per frame="I64Fd,
+ msg_Dbg( s, " - average time per frame=%"PRId64,
p_esp->i_average_time_per_frame );
msg_Dbg( s, " - stream name count=%d", p_esp->i_stream_name_count );
for( i = 0; i < p_esp->i_stream_name_count; i++ )
p_ae->pi_stream_number[i] = GetWLE( p_data );
p_data += 2;
}
-
+
#ifdef ASF_DEBUG
msg_Dbg( s, "read \"advanced mutual exclusion object\"" );
for( i = 0; i < p_ae->i_stream_number_count; i++ )
else if( i_type == 4 )
{
/* QWord */
- asprintf( &p_ec->ppsz_value[i], I64Fd, GetQWLE(p_data));
+ asprintf( &p_ec->ppsz_value[i], "%"PRId64, GetQWLE(p_data));
}
else if( i_type == 5 )
{
p_ec->ppsz_value[i] = NULL;
p_data += i_size;
-
+
#undef GETSTRINGW
str[i * 5] = '|';
}
snprintf( str + 5*i_level, 1024,
- "+ '%s' GUID "GUID_FMT" size:"I64Fu"pos:"I64Fu,
+ "+ '%s' GUID "GUID_FMT" size:%"PRIu64"pos:%"PRIu64,
psz_name,
GUID_PRINT( p_node->i_object_id ),
p_node->i_object_size, p_node->i_object_pos );