Commit cb827319 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: heif: send extradata with avif

parent be03a7a0
......@@ -343,11 +343,9 @@ static int SetPictureProperties( demux_t *p_demux, uint32_t i_item_id,
{
case ATOM_hvcC:
case ATOM_avcC:
case ATOM_av1C:
if( !fmt->p_extra && p_prop->data.p_binary &&
((fmt->i_codec == VLC_CODEC_HEVC && p_prop->i_type == ATOM_hvcC) ||
(fmt->i_codec == VLC_CODEC_H264 && p_prop->i_type == ATOM_avcC) ||
(fmt->i_codec == VLC_CODEC_AV1 && p_prop->i_type == ATOM_av1C)) )
(fmt->i_codec == VLC_CODEC_H264 && p_prop->i_type == ATOM_avcC) ))
{
fmt->p_extra = malloc( p_prop->data.p_binary->i_blob );
if( fmt->p_extra )
......@@ -357,6 +355,18 @@ static int SetPictureProperties( demux_t *p_demux, uint32_t i_item_id,
}
}
break;
case ATOM_av1C:
if( fmt->i_codec == VLC_CODEC_AV1 && !fmt->i_extra &&
p_prop->data.p_av1C->i_av1C >= 4 )
{
fmt->p_extra = malloc( p_prop->data.p_av1C->i_av1C );
if( fmt->p_extra )
{
fmt->i_extra = p_prop->data.p_av1C->i_av1C ;
memcpy( fmt->p_extra, p_prop->data.p_av1C->p_av1C, fmt->i_extra );
}
}
break;
case ATOM_jpeC:
if( fmt->i_codec == VLC_CODEC_JPEG )
*p_header = p_prop;
......
......@@ -4811,6 +4811,7 @@ static const struct
{ ATOM_avcC, MP4_ReadBox_avcC, ATOM_avc3 },
{ ATOM_hvcC, MP4_ReadBox_Binary, 0 },
{ ATOM_jpeC, MP4_ReadBox_Binary, 0 }, /* heif */
{ ATOM_av1C, MP4_ReadBox_av1C, ATOM_ipco }, /* heif */
{ ATOM_vpcC, MP4_ReadBox_vpcC, ATOM_vp08 },
{ ATOM_vpcC, MP4_ReadBox_vpcC, ATOM_vp09 },
{ ATOM_vpcC, MP4_ReadBox_vpcC, ATOM_vp10 },
......
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