*****************************************************************************/
#include <vlc/vlc.h>
-#include <stdio.h>
-#include <stdlib.h> /* malloc(), free() */
#include <vlc_demux.h>
*/
-static uint32_t Get24bBE( uint8_t *p )
+static uint32_t Get24bBE( const uint8_t *p )
{
return( ( p[0] <<16 ) + ( p[1] <<8 ) + p[2] );
}
-static void GetUUID( UUID_t *p_uuid, uint8_t *p_buff )
+static void GetUUID( UUID_t *p_uuid, const uint8_t *p_buff )
{
memcpy( p_uuid, p_buff, 16 );
}
int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
{
int i_read;
- uint8_t *p_peek;
+ const uint8_t *p_peek;
if( ( ( i_read = stream_Peek( p_stream, &p_peek, 32 ) ) < 8 ) )
{
p_box->p_father->i_type == VLC_FOURCC( 'r', 'o', 'o', 't' ) &&
p_box->i_type == FOURCC_free )
{
- uint8_t *p_peek;
+ const uint8_t *p_peek;
int i_read;
vlc_fourcc_t i_fcc;
{
/* SoundDescriptionV2 */
double f_sample_rate;
- int64_t dummy;
+ int64_t dummy;
uint32_t i_channel;
MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet );
MP4_GET8BYTES( dummy );
- memcpy( &f_sample_rate, &dummy, 8 );
+ memcpy( &f_sample_rate, &dummy, 8 );
msg_Dbg( p_stream, "read box: %f Hz", f_sample_rate );
p_box->data.p_sample_soun->i_sampleratehi = (int)f_sample_rate % 65536;
}
#ifdef MP4_VERBOSE
- msg_Dbg( p_stream, "read box: \"elst\" entry-count "I64Fd, p_box->data.p_elst->i_entry_count );
+ msg_Dbg( p_stream, "read box: \"elst\" entry-count %lu",
+ (unsigned long)p_box->data.p_elst->i_entry_count );
#endif
MP4_READBOX_EXIT( 1 );
}
#ifdef MP4_VERBOSE
msg_Dbg( p_stream,
- "read box: \"%4.4s\" text=`%s'",
- (char*)&p_box->i_type,
+ "read box: \"c%3.3s\" text=`%s'",
+ ((char*)&p_box->i_type + 1),
p_box->data.p_0xa9xxx->psz_text );
#endif
}
p_box->data.p_0xa9xxx->psz_text[i_data_len] = '\0';
#ifdef MP4_VERBOSE
msg_Dbg( p_stream,
- "read box: \"%4.4s\" text=`%s'",
- (char*)&p_box->i_type,
+ "read box: \"c%3.3s\" text=`%s'",
+ ((char*)&p_box->i_type+1),
p_box->data.p_0xa9xxx->psz_text );
#endif
}