diff options
author | jstebbins <[email protected]> | 2015-02-17 21:10:59 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-02-17 21:10:59 +0000 |
commit | 264ee39dc2dbb3a966feb2849eaeb447c869086f (patch) | |
tree | 8406edc543e92e9d4512418dea1692eaf8d9c024 | |
parent | d8b88a234aba9dec5c9c988fbf68028da88b47de (diff) |
merge stream: fix potential overflow in pts calculation
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@6920 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/stream.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index d179ff3bb..6498331db 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -1558,11 +1558,11 @@ static struct pts_pos hb_sample_pts(hb_stream_t *stream, uint64_t fpos) hb_log("hb_sample_pts: no PTS in video packet near %"PRIu64, fpos); return pp; } - pp.pts = ( ( (uint64_t)pes[9] >> 1 ) & 7 << 30 ) | - ( (uint64_t)pes[10] << 22 ) | - ( ( (uint64_t)pes[11] >> 1 ) << 15 ) | - ( (uint64_t)pes[12] << 7 ) | - ( (uint64_t)pes[13] >> 1 ); + pp.pts = ((((uint64_t)pes[ 9] >> 1 ) & 7) << 30) | + ( (uint64_t)pes[10] << 22) | + ( ((uint64_t)pes[11] >> 1 ) << 15) | + ( (uint64_t)pes[12] << 7 ) | + ( (uint64_t)pes[13] >> 1 ); if ( ts_isIframe( stream, buf, adapt_len ) ) { |