summaryrefslogtreecommitdiff
path: root/libavformat/nut.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-16 19:59:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-16 19:59:01 +0200
commitde6c150444159a26fe2555089d384ddd2d6459aa (patch)
treefff8fe049ba5c9b2b4f7eff986d33002b24c8ba0 /libavformat/nut.c
parent340305646a8224eea9a9b8f01a6842b848cfd9c4 (diff)
nut: fix int32 overflow
Fixes CID700574 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nut.c')
-rw-r--r--libavformat/nut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 34c43d16fb..51e4d38394 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;
}