[vlc-commits] demux: dash: fix integer ofw (cid #1261993)

Francois Cartegnie git at videolan.org
Sun Jan 18 15:20:25 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 16 18:36:27 2015 +0100| [5f61756091bcafdc3c9d9373c7bee7b98cb92740] | committer: Francois Cartegnie

demux: dash: fix integer ofw (cid #1261993)

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

 modules/demux/dash/mpd/IsoffMainParser.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index 51b2fc2..2e7a45c 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -456,7 +456,7 @@ static int64_t vlc_timegm( int i_year, int i_month, int i_mday, int i_hour, int
         return -1;
 
     /* Count the number of days */
-    i_day = 365 * (i_year-70) + pn_day[i_month] + i_mday - 1;
+    i_day = (int64_t)365 * (i_year-70) + pn_day[i_month] + i_mday - 1;
 #define LEAP(y) ( ((y)%4) == 0 && (((y)%100) != 0 || ((y)%400) == 0) ? 1 : 0)
     for( int i = 70; i < i_year; i++ )
         i_day += LEAP(1900+i);



More information about the vlc-commits mailing list