Commit 4e523f3d authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: mp4: add support for FFV1 v2 (fix #13131)

V2 has global tables, and then needs it to be passed as
extradata IV.
parent aeff2712
......@@ -265,6 +265,22 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
break;
}
case VLC_CODEC_FFV1:
{
MP4_Box_t *p_binary = MP4_BoxGet( p_sample, "glbl" );
if( p_binary && BOXDATA(p_binary) && BOXDATA(p_binary)->i_blob )
{
p_track->fmt.p_extra = malloc( BOXDATA(p_binary)->i_blob );
if( p_track->fmt.p_extra )
{
p_track->fmt.i_extra = BOXDATA(p_binary)->i_blob;
memcpy( p_track->fmt.p_extra, BOXDATA(p_binary)->p_blob,
p_track->fmt.i_extra );
}
}
break;
}
case VLC_FOURCC( 'v', 'c', '-', '1' ):
{
MP4_Box_t *p_dvc1 = MP4_BoxGet( p_sample, "dvc1" );
......
......@@ -3666,6 +3666,7 @@ static const struct
{ ATOM_dac3, MP4_ReadBox_dac3, MP4_FreeBox_Common, 0 },
{ ATOM_dec3, MP4_ReadBox_dec3, MP4_FreeBox_Common, 0 },
{ ATOM_dvc1, MP4_ReadBox_dvc1, MP4_FreeBox_Common, 0 },
{ ATOM_glbl, MP4_ReadBox_Binary, MP4_FreeBox_Binary, ATOM_FFV1 },
{ ATOM_enda, MP4_ReadBox_enda, MP4_FreeBox_Common, 0 },
{ ATOM_iods, MP4_ReadBox_iods, MP4_FreeBox_Common, 0 },
{ ATOM_pasp, MP4_ReadBox_pasp, MP4_FreeBox_Common, 0 },
......@@ -3738,6 +3739,7 @@ static const struct
{ ATOM_3ivd, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_3VID, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_3vid, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_FFV1, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_mjpa, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_mjpb, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
{ ATOM_qdrw, MP4_ReadBox_sample_vide, MP4_FreeBox_sample_vide, ATOM_stsd },
......
......@@ -178,6 +178,7 @@
#define ATOM_3ivd VLC_FOURCC( '3', 'i', 'v', 'd' )
#define ATOM_3VID VLC_FOURCC( '3', 'V', 'I', 'D' )
#define ATOM_3vid VLC_FOURCC( '3', 'v', 'i', 'd' )
#define ATOM_FFV1 VLC_FOURCC( 'F', 'F', 'V', '1' )
#define ATOM_h263 VLC_FOURCC( 'h', '2', '6', '3' )
#define ATOM_s263 VLC_FOURCC( 's', '2', '6', '3' )
#define ATOM_DIVX VLC_FOURCC( 'D', 'I', 'V', 'X' )
......@@ -198,6 +199,7 @@
#define ATOM_avcC VLC_FOURCC( 'a', 'v', 'c', 'C' )
#define ATOM_m4ds VLC_FOURCC( 'm', '4', 'd', 's' )
#define ATOM_glbl VLC_FOURCC( 'g', 'l', 'b', 'l' )
#define ATOM_hvcC VLC_FOURCC( 'h', 'v', 'c', 'C' )
#define ATOM_dvc VLC_FOURCC( 'd', 'v', 'c', ' ' )
......
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