[vlc-commits] demux: heif: send extradata with avif
Francois Cartegnie
git at videolan.org
Mon Dec 17 18:32:18 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 17 17:10:53 2018 +0100| [cb827319a577f8df2c54104c4af68b4b000f28cf] | committer: Francois Cartegnie
demux: heif: send extradata with avif
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb827319a577f8df2c54104c4af68b4b000f28cf
---
modules/demux/mp4/heif.c | 16 +++++++++++++---
modules/demux/mp4/libmp4.c | 1 +
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c
index dae18d2497..e2a236f8da 100644
--- a/modules/demux/mp4/heif.c
+++ b/modules/demux/mp4/heif.c
@@ -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;
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 9390e98246..d42a4a0a4e 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -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 },
More information about the vlc-commits
mailing list