[vlc-commits] demux: mp4: drop hvCC specific
Francois Cartegnie
git at videolan.org
Tue May 5 20:36:04 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 5 20:34:53 2015 +0200| [86b00b542320568399668b1e6c8cdd50a34984ac] | committer: Francois Cartegnie
demux: mp4: drop hvCC specific
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86b00b542320568399668b1e6c8cdd50a34984ac
---
modules/demux/mp4/essetup.c | 12 ++++++------
modules/demux/mp4/libmp4.c | 25 +------------------------
modules/demux/mp4/libmp4.h | 7 -------
3 files changed, 7 insertions(+), 37 deletions(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 1414c09..2c9b7bd 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -334,14 +334,14 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
{
MP4_Box_t *p_hvcC = MP4_BoxGet( p_sample, "hvcC" );
- if( p_hvcC && BOXDATA(p_hvcC) )
+ if( p_hvcC && p_hvcC->data.p_binary )
{
- p_track->fmt.i_extra = BOXDATA(p_hvcC)->i_hvcC;
- if( p_track->fmt.i_extra > 0 )
+ p_track->fmt.p_extra = malloc( p_hvcC->data.p_binary->i_blob );
+ if( p_track->fmt.p_extra )
{
- p_track->fmt.p_extra = malloc( BOXDATA(p_hvcC)->i_hvcC );
- memcpy( p_track->fmt.p_extra, BOXDATA(p_hvcC)->p_hvcC,
- p_track->fmt.i_extra );
+ p_track->fmt.i_extra = p_hvcC->data.p_binary->i_blob;
+ memcpy( p_track->fmt.p_extra, p_hvcC->data.p_binary->p_blob,
+ p_hvcC->data.p_binary->i_blob );
}
p_track->fmt.i_codec = VLC_CODEC_HEVC;
}
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index d559d6c..b88273b 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1464,29 +1464,6 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
#undef es_descriptor
}
-static void MP4_FreeBox_hvcC(MP4_Box_t *p_box )
-{
- MP4_Box_data_hvcC_t *p_hvcC = p_box->data.p_hvcC;
- if( p_hvcC->i_hvcC > 0 ) FREENULL( p_hvcC->p_hvcC) ;
-}
-
-static int MP4_ReadBox_hvcC( stream_t *p_stream, MP4_Box_t *p_box )
-{
- MP4_Box_data_hvcC_t *p_hvcC;
-
- MP4_READBOX_ENTER( MP4_Box_data_hvcC_t, MP4_FreeBox_hvcC );
- p_hvcC = p_box->data.p_hvcC;
-
- p_hvcC->i_hvcC = i_read;
- if( p_hvcC->i_hvcC > 0 )
- {
- uint8_t * p = p_hvcC->p_hvcC = malloc( p_hvcC->i_hvcC );
- if( p )
- memcpy( p, p_peek, i_read );
- }
- MP4_READBOX_EXIT( 1 );
-}
-
static void MP4_FreeBox_avcC( MP4_Box_t *p_box )
{
MP4_Box_data_avcC_t *p_avcC = p_box->data.p_avcC;
@@ -3682,7 +3659,7 @@ static const struct
{ ATOM_cmvd, MP4_ReadBox_cmvd, 0 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc1 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc3 },
- { ATOM_hvcC, MP4_ReadBox_hvcC, 0 },
+ { ATOM_hvcC, MP4_ReadBox_Binary, 0 },
{ ATOM_dac3, MP4_ReadBox_dac3, 0 },
{ ATOM_dec3, MP4_ReadBox_dec3, 0 },
{ ATOM_dvc1, MP4_ReadBox_dvc1, 0 },
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 99c19b5..693629d 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1351,12 +1351,6 @@ typedef struct
typedef struct
{
- uint32_t i_hvcC;
- uint8_t *p_hvcC;
-} MP4_Box_data_hvcC_t;
-
-typedef struct
-{
enum
{
DATA_WKT_RESERVED = 0,
@@ -1470,7 +1464,6 @@ typedef union MP4_Box_data_s
MP4_Box_data_tfrf_t *p_tfrf;
MP4_Box_data_tfxd_t *p_tfxd;
- MP4_Box_data_hvcC_t *p_hvcC;
MP4_Box_data_WMA2_t *p_WMA2; /* flip4mac Little endian audio config */
MP4_Box_data_strf_t *p_strf; /* flip4mac Little endian video config */
MP4_Box_data_ASF_t *p_asf; /* flip4mac asf streams indicator */
More information about the vlc-commits
mailing list