[vlc-commits] [Git][videolan/vlc][3.0.x] demux: mp4: compute cts_shift when missing
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Feb 14 09:00:52 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
6905dfa3 by François Cartegnie at 2024-02-12T17:22:12+01:00
demux: mp4: compute cts_shift when missing
(cherry picked from commit a1ad08a051f85a645c0353116c930806cdda6128)
- - - - -
1 changed file:
- modules/demux/mp4/mp4.c
Changes:
=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -2693,7 +2693,17 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
int64_t i_cts_shift = 0;
const MP4_Box_t *p_cslg = MP4_BoxGet( p_demux_track->p_stbl, "cslg" );
if( p_cslg && BOXDATA(p_cslg) )
+ {
i_cts_shift = BOXDATA(p_cslg)->ct_to_dts_shift;
+ }
+ else if( ctts->i_entry_count ) /* Compute for Quicktime */
+ {
+ for( uint32_t i = 0; i < ctts->i_entry_count; i++ )
+ {
+ if( ctts->pi_sample_offset[i] < 0 && ctts->pi_sample_offset[i] < -i_cts_shift )
+ i_cts_shift = -ctts->pi_sample_offset[i];
+ }
+ }
/* Create pts-dts table per chunk */
uint32_t i_index = 0;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6905dfa3cf005f271109800f13bf3644d0ba4e4f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6905dfa3cf005f271109800f13bf3644d0ba4e4f
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