Commit 86b00b54 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: drop hvCC specific

parent de398e6b
...@@ -334,14 +334,14 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample ) ...@@ -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" ); 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; p_track->fmt.p_extra = malloc( p_hvcC->data.p_binary->i_blob );
if( p_track->fmt.i_extra > 0 ) if( p_track->fmt.p_extra )
{ {
p_track->fmt.p_extra = malloc( BOXDATA(p_hvcC)->i_hvcC ); p_track->fmt.i_extra = p_hvcC->data.p_binary->i_blob;
memcpy( p_track->fmt.p_extra, BOXDATA(p_hvcC)->p_hvcC, memcpy( p_track->fmt.p_extra, p_hvcC->data.p_binary->p_blob,
p_track->fmt.i_extra ); p_hvcC->data.p_binary->i_blob );
} }
p_track->fmt.i_codec = VLC_CODEC_HEVC; p_track->fmt.i_codec = VLC_CODEC_HEVC;
} }
......
...@@ -1464,29 +1464,6 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1464,29 +1464,6 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
#undef es_descriptor #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 ) static void MP4_FreeBox_avcC( MP4_Box_t *p_box )
{ {
MP4_Box_data_avcC_t *p_avcC = p_box->data.p_avcC; MP4_Box_data_avcC_t *p_avcC = p_box->data.p_avcC;
...@@ -3682,7 +3659,7 @@ static const struct ...@@ -3682,7 +3659,7 @@ static const struct
{ ATOM_cmvd, MP4_ReadBox_cmvd, 0 }, { ATOM_cmvd, MP4_ReadBox_cmvd, 0 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc1 }, { ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc1 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc3 }, { 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_dac3, MP4_ReadBox_dac3, 0 },
{ ATOM_dec3, MP4_ReadBox_dec3, 0 }, { ATOM_dec3, MP4_ReadBox_dec3, 0 },
{ ATOM_dvc1, MP4_ReadBox_dvc1, 0 }, { ATOM_dvc1, MP4_ReadBox_dvc1, 0 },
......
...@@ -1349,12 +1349,6 @@ typedef struct ...@@ -1349,12 +1349,6 @@ typedef struct
uint8_t *CodecPrivateData; uint8_t *CodecPrivateData;
} MP4_Box_data_stra_t; } MP4_Box_data_stra_t;
typedef struct
{
uint32_t i_hvcC;
uint8_t *p_hvcC;
} MP4_Box_data_hvcC_t;
typedef struct typedef struct
{ {
enum enum
...@@ -1470,7 +1464,6 @@ typedef union MP4_Box_data_s ...@@ -1470,7 +1464,6 @@ typedef union MP4_Box_data_s
MP4_Box_data_tfrf_t *p_tfrf; MP4_Box_data_tfrf_t *p_tfrf;
MP4_Box_data_tfxd_t *p_tfxd; 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_WMA2_t *p_WMA2; /* flip4mac Little endian audio config */
MP4_Box_data_strf_t *p_strf; /* flip4mac Little endian video config */ MP4_Box_data_strf_t *p_strf; /* flip4mac Little endian video config */
MP4_Box_data_ASF_t *p_asf; /* flip4mac asf streams indicator */ MP4_Box_data_ASF_t *p_asf; /* flip4mac asf streams indicator */
......
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