[FFmpeg-cvslog] nut: fix int32 overflow

Michael Niedermayer git at videolan.org
Tue Oct 16 20:12:44 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 16 19:59:01 2012 +0200| [de6c150444159a26fe2555089d384ddd2d6459aa] | committer: Michael Niedermayer

nut: fix int32 overflow

Fixes CID700574
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/nut.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/nut.c b/libavformat/nut.c
index 34c43d1..51e4d38 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -155,7 +155,7 @@ void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
 }
 
 int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){
-    int64_t mask = (1<<stream->msb_pts_shift)-1;
+    int64_t mask = (1ULL<<stream->msb_pts_shift)-1;
     int64_t delta= stream->last_pts - mask/2;
     return  ((lsb - delta)&mask) + delta;
 }



More information about the ffmpeg-cvslog mailing list