Commit 627633ae authored by Stéphane Borel's avatar Stéphane Borel

* Minor changes

parent 0a267fd4
......@@ -159,9 +159,9 @@ void IfoEnd( ifo_t* p_ifo )
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;
}
......@@ -280,39 +280,42 @@ fprintf( stderr, "PGC\n" );
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 */
......@@ -384,7 +387,7 @@ static pgci_inf_t ReadUnit( ifo_t* p_ifo )
{
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" );
......@@ -423,7 +426,7 @@ static pgci_ut_t ReadUnitTable( ifo_t* p_ifo )
{
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" );
......@@ -439,7 +442,7 @@ 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 );
......@@ -469,7 +472,7 @@ static c_adt_t ReadCellInf( ifo_t* p_ifo )
{
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" );
......@@ -503,7 +506,7 @@ static vobu_admap_t ReadMap( ifo_t* p_ifo )
{
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" );
......@@ -530,7 +533,7 @@ static vmgi_mat_t ReadVMGInfMat( ifo_t* p_ifo )
{
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" );
......@@ -547,7 +550,7 @@ 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 );
......@@ -587,7 +590,7 @@ static vmg_ptt_srpt_t ReadVMGTitlePointer( ifo_t* p_ifo )
{
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" );
......@@ -623,7 +626,7 @@ static vmg_ptl_mait_t ReadParentalInf( ifo_t* p_ifo )
{
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" );
......@@ -639,7 +642,7 @@ 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 );
......@@ -682,7 +685,7 @@ static vmg_vts_atrt_t ReadVTSAttr( ifo_t* p_ifo )
{
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" );
......@@ -817,7 +820,7 @@ static vtsi_mat_t ReadVTSInfMat( ifo_t* p_ifo )
{
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" );
......@@ -883,7 +886,7 @@ static vts_ptt_srpt_t ReadVTSTitlePointer( ifo_t* p_ifo )
{
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" );
......@@ -927,7 +930,7 @@ static vts_tmap_ti_t ReadVTSTimeMap( ifo_t* p_ifo )
{
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" );
......
......@@ -41,10 +41,11 @@ typedef struct pgc_com_tab_s
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" */
......@@ -120,7 +121,7 @@ typedef struct pgc_s
/* 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
......@@ -207,7 +208,7 @@ typedef struct vmgi_mat_s
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
......@@ -264,7 +265,7 @@ typedef struct vmg_ptt_srpt_s
*/
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] ???
......@@ -299,15 +300,15 @@ typedef struct vts_atrt_s
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment