[vlc-commits] demux:mpeg: make sure FROM_SCALE_NZ() returns a vlc_tick_t

Steve Lhomme git at videolan.org
Thu Sep 20 16:15:56 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 13:04:04 2018 +0200| [c58f46eec96045389f20e4b9bea79d47974b9cc3] | committer: Steve Lhomme

demux:mpeg: make sure FROM_SCALE_NZ() returns a vlc_tick_t

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c58f46eec96045389f20e4b9bea79d47974b9cc3
---

 modules/access/bluray.c         | 2 +-
 modules/demux/mpeg/timestamps.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index ee589e41b0..332de5b438 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1953,7 +1953,7 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
         if(p_sys->cur_title < p_sys->i_title &&
            (CURRENT_TITLE->i_flags & INPUT_TITLE_INTERACTIVE))
                 return VLC_EGENERIC;
-        *pi_time = (vlc_tick_t)FROM_SCALE_NZ(bd_tell_time(p_sys->bluray));
+        *pi_time = FROM_SCALE_NZ(bd_tell_time(p_sys->bluray));
         return VLC_SUCCESS;
     }
 
diff --git a/modules/demux/mpeg/timestamps.h b/modules/demux/mpeg/timestamps.h
index 19dca89227..2dacb2bad7 100644
--- a/modules/demux/mpeg/timestamps.h
+++ b/modules/demux/mpeg/timestamps.h
@@ -19,7 +19,7 @@
 #ifndef VLC_MPEG_TIMESTAMPS_H
 #define VLC_MPEG_TIMESTAMPS_H
 
-#define FROM_SCALE_NZ(x) ((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))



More information about the vlc-commits mailing list