[vlc-commits] [Git][videolan/vlc][master] demux: heif: only use the ispe atom if the values are legit

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jan 7 12:59:05 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f917bf08 by Steve Lhomme at 2026-01-07T12:34:38+00:00
demux: heif: only use the ispe atom if the values are legit

Similar to what is done below with the clap atom.

Fixes #29470

- - - - -


1 changed file:

- modules/demux/mp4/heif.c


Changes:

=====================================
modules/demux/mp4/heif.c
=====================================
@@ -395,8 +395,12 @@ static int SetPictureProperties( demux_t *p_demux, uint32_t i_item_id,
                         *p_header = p_prop;
                     break;
                 case ATOM_ispe:
-                    fmt->video.i_visible_width = p_prop->data.p_ispe->i_width;
-                    fmt->video.i_visible_height = p_prop->data.p_ispe->i_height;
+                    if (p_prop->data.p_ispe->i_width <= fmt->video.i_width &&
+                        p_prop->data.p_ispe->i_height <= fmt->video.i_height)
+                    {
+                        fmt->video.i_visible_width = p_prop->data.p_ispe->i_width;
+                        fmt->video.i_visible_height = p_prop->data.p_ispe->i_height;
+                    }
                     break;
                 case ATOM_clap:
                     if(p_prop->data.p_clap->i_width + p_prop->data.p_clap->i_x_offset <= fmt->video.i_width &&



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f917bf081f007f351358fc42687e1d369f5c4436

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f917bf081f007f351358fc42687e1d369f5c4436
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list