avformat/nutdec: fix pts overflow

Probably fixes #6913.
This commit is contained in:
Paul B Mahol 2018-12-14 21:48:17 +01:00
parent b4c8c03b00
commit 6bfc935232
1 changed files with 2 additions and 2 deletions

View File

@ -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);