* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.69.2.1 2001/12/11 13:56:18 massiot Exp $
+ * $Id: mpeg_system.c,v 1.69.2.2 2001/12/13 17:35:55 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
for( i_loop = 0; i_loop < (i_section_length - 9) / 4 ; i_loop++ )
{
- i_program_id = ( *(u32 *)(p_current_data + i_loop * 4 + 8) << 8 ) |
+ i_program_id = ( (u32)*(p_current_data + i_loop * 4 + 8) << 8 ) |
*(p_current_data + i_loop * 4 + 9);
- i_pmt_pid = ( (*(u32 *)( p_current_data + i_loop * 4 + 10) & 0x1F)
+ i_pmt_pid = ( ((u32)*( p_current_data + i_loop * 4 + 10) & 0x1F)
<< 8 ) |
*( p_current_data + i_loop * 4 + 11);
p_current_section = p_psi->buffer;
p_current_data = p_psi->buffer;
- p_pgrm_data->i_pcr_pid = ( (*(u32 *)(p_current_section + 8) & 0x1F) << 8 ) |
+ p_pgrm_data->i_pcr_pid = ( ((u32)*(p_current_section + 8) & 0x1F) << 8 ) |
*(p_current_section + 9);
i_audio_es = 0;
/* Then add what we received in this PMT */
do
{
- i_section_length = ( (*(u32 *)(p_current_data + 1) & 0xF) << 8 ) |
+ i_section_length = ( ((u32)*(p_current_data + 1) & 0xF) << 8 ) |
*(p_current_data + 2);
i_current_section = (u8)p_current_data[6];
- i_prog_info_length = ( (*(u32 *)(p_current_data + 10) & 0xF) << 8 ) |
+ i_prog_info_length = ( ((u32)*(p_current_data + 10) & 0xF) << 8 ) |
*(p_current_data + 11);
/* For the moment we ignore program descriptors */
while( p_current_data < p_current_section + i_section_length -1 )
{
i_stream_type = (int)p_current_data[0];
- i_pid = ( (*(u32 *)(p_current_data + 1) & 0x1F) << 8 ) |
+ i_pid = ( ((u32)*(p_current_data + 1) & 0x1F) << 8 ) |
*(p_current_data + 2);
- i_es_info_length = ( (*(u32 *)(p_current_data + 3) & 0xF) << 8 ) |
+ i_es_info_length = ( ((u32)*(p_current_data + 3) & 0xF) << 8 ) |
*(p_current_data + 4);
/* Add this ES to the program */