Commit 98f4d470 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: libmp4: remove padb wich isn't fixed

parent 23d1f008
......@@ -3178,55 +3178,6 @@ static int MP4_ReadBox_stdp( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT( 1 );
}
static void MP4_FreeBox_padb( MP4_Box_t *p_box )
{
free( p_box->data.p_padb->i_reserved );
free( p_box->data.p_padb->i_pad );
}
static int MP4_ReadBox_padb( stream_t *p_stream, MP4_Box_t *p_box )
{
uint32_t count;
MP4_READBOX_ENTER( MP4_Box_data_padb_t, MP4_FreeBox_padb );
MP4_GETVERSIONFLAGS( p_box->data.p_padb );
MP4_GET4BYTES( count );
if( ((count / 2) + (count & 1)) > i_read )
{
MP4_READBOX_EXIT( 0 );
}
p_box->data.p_padb->i_reserved = malloc( count );
p_box->data.p_padb->i_pad = malloc( count );
p_box->data.p_padb->i_sample_count = count;
if( unlikely(p_box->data.p_padb->i_reserved == NULL
|| p_box->data.p_padb->i_pad == NULL) )
{
MP4_READBOX_EXIT( 0 );
}
for( size_t i = 0; i < count; i += 2 )
{
p_box->data.p_padb->i_reserved[i] = ( (*p_peek) >> 7 )&0x01;
p_box->data.p_padb->i_pad[i + 1] = ( (*p_peek) >> 4 )&0x07;
p_box->data.p_padb->i_reserved[i + 1] = ( (*p_peek) >> 3 )&0x01;
p_box->data.p_padb->i_pad[i] = ( (*p_peek) )&0x07;
p_peek++;
i_read--;
}
#ifdef MP4_VERBOSE
msg_Dbg( p_stream, "read box: \"stdp\" entry-count %"PRIu64,
i_read / 2 );
#endif
MP4_READBOX_EXIT( 1 );
}
static void MP4_FreeBox_elst( MP4_Box_t *p_box )
{
free( p_box->data.p_elst->i_segment_duration );
......@@ -4471,7 +4422,6 @@ static const struct
{ ATOM_stss, MP4_ReadBox_stss, ATOM_stbl },
{ ATOM_stsh, MP4_ReadBox_stsh, ATOM_stbl },
{ ATOM_stdp, MP4_ReadBox_stdp, 0 },
{ ATOM_padb, MP4_ReadBox_padb, 0 },
{ ATOM_elst, MP4_ReadBox_elst, ATOM_edts },
{ ATOM_cprt, MP4_ReadBox_cprt, 0 },
{ ATOM_esds, MP4_ReadBox_esds, ATOM_wave }, /* mp4a in wave chunk */
......
......@@ -99,7 +99,6 @@ typedef int64_t stime_t;
#define ATOM_stss VLC_FOURCC( 's', 't', 's', 's' )
#define ATOM_stsh VLC_FOURCC( 's', 't', 's', 'h' )
#define ATOM_stdp VLC_FOURCC( 's', 't', 'd', 'p' )
#define ATOM_padb VLC_FOURCC( 'p', 'a', 'd', 'b' )
#define ATOM_edts VLC_FOURCC( 'e', 'd', 't', 's' )
#define ATOM_elst VLC_FOURCC( 'e', 'l', 's', 't' )
#define ATOM_mvex VLC_FOURCC( 'm', 'v', 'e', 'x' )
......@@ -928,19 +927,6 @@ typedef struct MP4_Box_data_stdp_s
} MP4_Box_data_stdp_t;
typedef struct MP4_Box_data_padb_s
{
uint8_t i_version;
uint32_t i_flags;
uint32_t i_sample_count;
unsigned char *i_reserved; /* 1bit */
unsigned char *i_pad; /* 3bits */
} MP4_Box_data_padb_t;
typedef struct MP4_Box_data_elst_s
{
uint8_t i_version;
......@@ -1702,7 +1688,6 @@ typedef union MP4_Box_data_s
MP4_Box_data_stss_t *p_stss;
MP4_Box_data_stsh_t *p_stsh;
MP4_Box_data_stdp_t *p_stdp;
MP4_Box_data_padb_t *p_padb;
MP4_Box_data_elst_t *p_elst;
MP4_Box_data_cprt_t *p_cprt;
......
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