[vlc-commits] [Git][videolan/vlc][master] demux: mp4: fix overflow applying roll distance
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Oct 26 15:06:05 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
1c444567 by François Cartegnie at 2023-10-26T14:36:46+00:00
demux: mp4: fix overflow applying roll distance
bogus implemenation in b8106fe8
- - - - -
1 changed file:
- modules/demux/mp4/mp4.c
Changes:
=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -3538,7 +3538,12 @@ static int TrackTimeToSampleChunk( demux_t *p_demux, mp4_track_t *p_track,
msg_Dbg(p_demux, "track[Id 0x%x] preroll offset: %"PRId16" samples",
p_track->i_track_ID, p_entrydesc->roll.i_roll_distance );
if( p_entrydesc->roll.i_roll_distance < 0 )
- i_sync_sample += p_entrydesc->roll.i_roll_distance;
+ {
+ if( i_sync_sample > (uint32_t)-p_entrydesc->roll.i_roll_distance )
+ i_sync_sample += p_entrydesc->roll.i_roll_distance;
+ else
+ i_sync_sample = 0;
+ }
}
else if( p_track->i_decoder_delay > 0 &&
p_track->i_decoder_delay <= i_start )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1c444567bb5156aca00560f3a28e6984c3297674
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1c444567bb5156aca00560f3a28e6984c3297674
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