[vlc-commits] demux: libmp4: remove padb wich isn't fixed
Francois Cartegnie
git at videolan.org
Wed Dec 13 20:47:07 CET 2017
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 13 19:15:58 2017 +0100| [858900671c46058f1a3e15b256e2f0e626dc5bab] | committer: Francois Cartegnie
demux: libmp4: remove padb wich isn't fixed
(cherry picked from commit 98f4d470875860572a9080c848462171b5338e01)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=858900671c46058f1a3e15b256e2f0e626dc5bab
---
modules/demux/mp4/libmp4.c | 50 ----------------------------------------------
modules/demux/mp4/libmp4.h | 15 --------------
2 files changed, 65 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 7a7ae3fd95..3082a1048f 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3146,55 +3146,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 )
-{
- FREENULL( p_box->data.p_padb->i_reserved );
- FREENULL( 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 )
{
FREENULL( p_box->data.p_elst->i_segment_duration );
@@ -4440,7 +4391,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 */
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index b8fcb682a0..b0c46cf8a6 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -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;
More information about the vlc-commits
mailing list