[vlc-commits] [Git][videolan/vlc][master] demux: mpeg: cast to vlc_tick_t early

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Fri Aug 15 11:08:44 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
031b57d6 by Steve Lhomme at 2025-08-15T10:53:00+00:00
demux: mpeg: cast to vlc_tick_t early

So we can pass smaller type and not overflow.

- - - - -


1 changed file:

- modules/demux/mpeg/timestamps.h


Changes:

=====================================
modules/demux/mpeg/timestamps.h
=====================================
@@ -19,7 +19,7 @@
 #ifndef VLC_MPEG_TIMESTAMPS_H
 #define VLC_MPEG_TIMESTAMPS_H
 
-#define FROM_SCALE_NZ(x) ((vlc_tick_t)((x) * 100 / 9))
+#define FROM_SCALE_NZ(x) (((vlc_tick_t)(x) * 100 / 9))
 #define TO_SCALE_NZ(x)   ((x) * 9 / 100)
 
 #define FROM_SCALE(x) (VLC_TICK_0 + FROM_SCALE_NZ(x))



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/031b57d6ad2275f8fa2e35d3fbbed918745830c3
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