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:
nicodvb 2006-05-03 17:55:02 +00:00
parent 54a3ec649f
commit c5777d7f53
1 changed files with 1 additions and 1 deletions

View File

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