[vlc-devel] [PATCH] heif: avoid crashing on AVIF files

Tristan Matthews tmatth at videolan.org
Fri Dec 14 22:45:03 CET 2018


Samples here: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/AVIF/
---
 modules/demux/mp4/heif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c
index e923bb3357..d595ca9865 100644
--- a/modules/demux/mp4/heif.c
+++ b/modules/demux/mp4/heif.c
@@ -344,7 +344,7 @@ 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 &&
+                    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)) )
-- 
2.17.1



More information about the vlc-devel mailing list