free( p_ifo->vmg.pgc.p_cell_pos_inf );
free( p_ifo->vmg.pgc.p_cell_play_inf );
free( p_ifo->vmg.pgc.prg_map.pi_entry_cell );
- free( p_ifo->vmg.pgc.com_tab.psz_cell_com );
- free( p_ifo->vmg.pgc.com_tab.psz_post_com );
- free( p_ifo->vmg.pgc.com_tab.psz_pre_com );
+ free( p_ifo->vmg.pgc.com_tab.ps_cell_com );
+ free( p_ifo->vmg.pgc.com_tab.ps_post_com );
+ free( p_ifo->vmg.pgc.com_tab.ps_pre_com );
return;
}
FLUSH( 2 );
if( pgc.com_tab.i_pre_com_nb )
{
- pgc.com_tab.psz_pre_com =
- malloc(8*pgc.com_tab.i_pre_com_nb);
- if( pgc.com_tab.psz_pre_com == NULL )
+ pgc.com_tab.ps_pre_com =
+ malloc(pgc.com_tab.i_pre_com_nb *COMMAND_SIZE);
+ if( pgc.com_tab.ps_pre_com == NULL )
{
intf_ErrMsg( "Out of memory" );
p_ifo->b_error = 1;
return pgc;
}
- GET( pgc.com_tab.psz_pre_com, (8*pgc.com_tab.i_pre_com_nb) );
+ GET( pgc.com_tab.ps_pre_com,
+ pgc.com_tab.i_pre_com_nb *COMMAND_SIZE );
}
if( pgc.com_tab.i_post_com_nb )
{
- pgc.com_tab.psz_post_com =
- malloc(8*pgc.com_tab.i_post_com_nb);
- if( pgc.com_tab.psz_post_com == NULL )
+ pgc.com_tab.ps_post_com =
+ malloc(pgc.com_tab.i_post_com_nb *COMMAND_SIZE);
+ if( pgc.com_tab.ps_post_com == NULL )
{
intf_ErrMsg( "Out of memory" );
p_ifo->b_error = 1;
return pgc;
}
- GET( pgc.com_tab.psz_post_com, 8*pgc.com_tab.i_post_com_nb );
+ GET( pgc.com_tab.ps_post_com,
+ pgc.com_tab.i_post_com_nb *COMMAND_SIZE );
}
if( pgc.com_tab.i_cell_com_nb )
{
- pgc.com_tab.psz_cell_com =
- malloc(8*pgc.com_tab.i_cell_com_nb);
- if( pgc.com_tab.psz_cell_com == NULL )
+ pgc.com_tab.ps_cell_com =
+ malloc(pgc.com_tab.i_cell_com_nb *COMMAND_SIZE);
+ if( pgc.com_tab.ps_cell_com == NULL )
{
intf_ErrMsg( "Out of memory" );
p_ifo->b_error = 1;
return pgc;
}
- GET( pgc.com_tab.psz_cell_com, 8*pgc.com_tab.i_cell_com_nb );
+ GET( pgc.com_tab.ps_cell_com,
+ pgc.com_tab.i_cell_com_nb *COMMAND_SIZE );
}
}
/* Parsing of pgc_prg_map_t */
{
pgci_inf_t inf;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "Unit\n" );
{
pgci_ut_t pgci;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "Unit Table\n" );
}
for( i=0 ; i<pgci.i_lu_nb ; i++ )
{
- GETS( &pgci.p_lu[i].i_lang_code );
+ GET( pgci.p_lu[i].ps_lang_code, 2 );
FLUSH( 1 );
GETC( &pgci.p_lu[i].i_existence_mask );
GETL( &pgci.p_lu[i].i_lu_sbyte );
{
c_adt_t c_adt;
int i, i_max;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "CELL ADD\n" );
{
vobu_admap_t map;
int i, i_max;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "VOBU ADMAP\n" );
{
vmgi_mat_t mat;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "VMGI\n" );
GETC( &mat.i_disc_side );
FLUSH( 19 );
GETS( &mat.i_tts_nb );
- GET( mat.psz_provider_id, 32 );
+ GET( mat.ps_provider_id, 32 );
GETLL( &mat.i_pos_code );
FLUSH( 24 );
GETL( &mat.i_i_mat_ebyte );
{
vmg_ptt_srpt_t ptr;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "PTR\n" );
{
vmg_ptl_mait_t par;
int i, j, k;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "PTL\n" );
}
for( i=0 ; i<par.i_country_nb ; i++ )
{
- GETS( &par.p_ptl_desc[i].i_country_code );
+ GET( par.p_ptl_desc[i].ps_country_code, 2 );
FLUSH( 2 );
GETS( &par.p_ptl_desc[i].i_ptl_mai_sbyte );
FLUSH( 2 );
{
vmg_vts_atrt_t atrt;
int i, j;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "VTS ATTR\n" );
{
vtsi_mat_t mat;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "VTSI\n" );
{
vts_ptt_srpt_t ptr;
int i;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "PTR\n" );
{
vts_tmap_ti_t tmap;
int i,j;
- off64_t i_start = p_ifo->i_pos;
+ off64_t i_start = p_ifo->i_pos;
fprintf( stderr, "TMAP\n" );
u16 i_post_com_nb; // 2 bytes
u16 i_cell_com_nb; // 2 bytes
// char[2] ???
- char* psz_pre_com; // i_pre_com_nb * 8 bytes
- char* psz_post_com; // i_post_com_nb * 8 bytes
- char* psz_cell_com; // i_cell_com_nb * 8 bytes
+ char* ps_pre_com; // i_pre_com_nb * 8 bytes
+ char* ps_post_com; // i_post_com_nb * 8 bytes
+ char* ps_cell_com; // i_cell_com_nb * 8 bytes
} pgc_com_tab_t;
+#define COMMAND_SIZE 8
/* Program Chain Map Table
* - start at "i_pgc_prg_map_sbyte" */
/* Menu PGCI Language unit Descriptor */
typedef struct pgci_lu_s
{
- u16 i_lang_code; // 2 bytes (ISO-xx)
+ char ps_lang_code[2]; // 2 bytes (ISO-xx)
// char ???
u8 i_existence_mask; // 1 byte
u32 i_lu_sbyte; // 4 bytes
u8 i_disc_side; // 1 bytes
// char[20] ???
u16 i_tts_nb; // 2 bytes
- char psz_provider_id[32]; // 32 bytes
+ char ps_provider_id[32]; // 32 bytes
u64 i_pos_code; // 8 bytes
// char[24] ???
u32 i_i_mat_ebyte; // 4 bytes
*/
typedef struct vmg_ptl_mai_desc_s
{
- u16 i_country_code; // 2 bytes
+ char ps_country_code[2]; // 2 bytes
// char[2] ???
u16 i_ptl_mai_sbyte; // 2 bytes
// char[2] ???
u16 i_vtsm_video_atrt; // 2 bytes
// char ???
u8 i_vtsm_audio_nb; // 1 byte
- u64 pi_vtsm_audio_atrt[8]; // i_vtsm_audio_nb * 8 bytes
-// char ???
+ u64 pi_vtsm_audio_atrt[8]; // 8 * 8 bytes
+// char[17] ???
u8 i_vtsm_subpic_nb; // 1 byte
u64 pi_vtsm_subpic_atrt[28]; // i_vtsm_subpic_nb * 6 bytes
// char[2] ???
u16 i_vtstt_video_atrt; // 2 bytes
// char ???
u8 i_vtstt_audio_nb; // 1 byte
- u64 pi_vtstt_audio_atrt[8]; // i_vtstt_audio_nb * 8 bytes
+ u64 pi_vtstt_audio_atrt[8]; // 8 * 8 bytes
// char[17] ???
u8 i_vtstt_subpic_nb; // 1 byte
u64 pi_vtstt_subpic_atrt[28]; // i_vtstt_subpic_nb * 6 bytes