Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a998d8b6 by Felix Paul Kühne at 2026-06-19T04:30:41+00:00
demux/mp4: fix display of slides included in m4b media

Apple m4b audiobooks reference both a text chapter track and a
video slide track from the audio track's tref/chap. Flagging both
as USEAS_CHAPTERS hid the slides, since MP4_isMetadata() then
prevented an ES from being created.

Skip USEAS_CHAPTERS for a chap-referenced video track, so the
slide track stays a regular video ES.

Fix #7791

- - - - -


1 changed file:

- modules/demux/mp4/mp4.c


Changes:

=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -1304,7 +1304,18 @@ static int Open( vlc_object_t * p_this )
                 {
                     msg_Dbg( p_demux, "track 0x%x refs track 0x%x for %4.4s", 
i,
                              refdata->i_track_ID[j], (const char *) 
&p_refbox->i_type );
-                    reftk->i_use_flags |= MP4_reftypeToFlag( p_refbox->i_type 
);
+                    int i_flag = MP4_reftypeToFlag( p_refbox->i_type );
+                    /* chap may reference a video track holding slide artwork; 
such a track is not a chapter source */
+                    if( i_flag == USEAS_CHAPTERS )
+                    {
+                        const MP4_Box_t *p_hdlr = MP4_BoxGet( reftk->p_track, 
"mdia/hdlr" );
+                        if( p_hdlr && BOXDATA(p_hdlr) &&
+                            BOXDATA(p_hdlr)->i_handler_type == ATOM_vide )
+                        {
+                            i_flag = USEAS_NONE;
+                        }
+                    }
+                    reftk->i_use_flags |= i_flag;
                 }
             }
         }



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

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/a998d8b6301572c08182f36ac33aa19fb75e84b6
You're receiving this email because of your account on code.videolan.org. 
Manage all notifications: https://code.videolan.org/-/profile/notifications | 
Help: https://code.videolan.org/help


_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to