aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-12-14 21:48:17 +0100
committerPaul B Mahol <onemda@gmail.com>2018-12-14 21:53:41 +0100
commit6bfc935232fbdb584abef0ec4560be00c5797f46 (patch)
tree3af999fddf8c26384bcc4c1566c7edb36dfca913 /libavformat/nutdec.c
parentb4c8c03b004077c0160c9898e8e5b7acc3bea630 (diff)
downloadffmpeg-6bfc935232fbdb584abef0ec4560be00c5797f46.tar.gz
avformat/nutdec: fix pts overflow
Probably fixes #6913.
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 9910ffe936..056ef59d00 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1016,9 +1016,9 @@ static int decode_frame_header(NUTContext *nut, int64_t *pts, int *stream_id,
}
stc = &nut->stream[*stream_id];
if (flags & FLAG_CODED_PTS) {
- int coded_pts = ffio_read_varlen(bc);
+ int64_t coded_pts = ffio_read_varlen(bc);
// FIXME check last_pts validity?
- if (coded_pts < (1 << stc->msb_pts_shift)) {
+ if (coded_pts < (1LL << stc->msb_pts_shift)) {
*pts = ff_lsb2full(stc, coded_pts);
} else
*pts = coded_pts - (1LL << stc->msb_pts_shift);