mirror of
https://github.com/mpv-player/mpv
synced 2025-02-07 15:41:55 +00:00
in read_mpeg_timestamp() cast int expression to uint64_t before shifting to avoid truncation of bits and to prevent propagation of bit 1 as sign bit in pts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18381 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
54a3ec649f
commit
c5777d7f53
@ -161,7 +161,7 @@ static unsigned long long read_mpeg_timestamp(stream_t *s,int c){
|
||||
++mpeg_pts_error;
|
||||
return 0; // invalid pts
|
||||
}
|
||||
pts=(((c>>1)&7)<<30)|((d>>1)<<15)|(e>>1);
|
||||
pts=(((uint64_t)((c>>1)&7))<<30)|((d>>1)<<15)|(e>>1);
|
||||
mp_dbg(MSGT_DEMUX,MSGL_DBG3,"{%d}",pts);
|
||||
return pts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user