Commit 08a2eb61 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: add support for isoflac

3rd flavour of metadata storing. yay
parent 775de716
......@@ -905,6 +905,24 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
}
break;
}
case ATOM_fLaC:
{
const MP4_Box_t *p_dfLa = MP4_BoxGet( p_sample, "dfLa", 0 );
if( p_dfLa && p_dfLa->data.p_binary->i_blob > 4 &&
GetDWBE(p_dfLa->data.p_binary->p_blob) == 0 ) /* fullbox header, avoids creating dedicated parser */
{
size_t i_extra = p_dfLa->data.p_binary->i_blob;
uint8_t *p_extra = malloc(i_extra);
{
p_track->fmt.i_extra = i_extra;
p_track->fmt.p_extra = p_extra;
memcpy( p_extra, p_dfLa->data.p_binary->p_blob, p_dfLa->data.p_binary->i_blob);
memcpy( p_extra, "fLaC", 4 );
p_track->fmt.i_codec = VLC_CODEC_FLAC;
}
}
break;
}
case( ATOM_eac3 ):
{
const MP4_Box_t *p_dec3 = MP4_BoxGet( p_sample, "dec3", 0 );
......
......@@ -4221,6 +4221,7 @@ static const struct
{ ATOM_esds, MP4_ReadBox_esds, ATOM_mp4v },
{ ATOM_esds, MP4_ReadBox_esds, ATOM_mp4s },
{ ATOM_dcom, MP4_ReadBox_dcom, 0 },
{ ATOM_dfLa, MP4_ReadBox_Binary, ATOM_fLaC },
{ ATOM_cmvd, MP4_ReadBox_cmvd, 0 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc1 },
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc3 },
......@@ -4277,6 +4278,7 @@ static const struct
{ ATOM_agsm, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_ac3, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_eac3, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_fLaC, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_lpcm, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_ms02, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_ms11, MP4_ReadBox_sample_soun, ATOM_stsd },
......
......@@ -193,6 +193,8 @@ typedef int64_t stime_t;
#define ATOM_fl32 VLC_FOURCC( 'f', 'l', '3', '2' )
#define ATOM_fl64 VLC_FOURCC( 'f', 'l', '6', '4' )
#define ATOM_Opus VLC_FOURCC( 'O', 'p', 'u', 's' )
#define ATOM_fLaC VLC_FOURCC( 'f', 'L', 'a', 'C' )
#define ATOM_dfLa VLC_FOURCC( 'd', 'f', 'L', 'a' )
/* XiphQT */
#define ATOM_fCtS VLC_FOURCC( 'f', 'C', 't', 'S' )
......
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