1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

Fix a bug in stream_read_qword_le due to sign extension from int to uint64_t.

Patch by Sean Veers [cf3cf3 gmail com]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24099 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-08-19 08:50:58 +00:00
parent 3988488e76
commit 46afe7d1d2

View File

@ -186,14 +186,8 @@ inline static uint64_t stream_read_qword(stream_t *s){
inline static uint64_t stream_read_qword_le(stream_t *s){
uint64_t y;
y = stream_read_char(s);
y|=stream_read_char(s)<<8;
y|=stream_read_char(s)<<16;
y|=stream_read_char(s)<<24;
y|=(uint64_t)stream_read_char(s)<<32;
y|=(uint64_t)stream_read_char(s)<<40;
y|=(uint64_t)stream_read_char(s)<<48;
y|=(uint64_t)stream_read_char(s)<<56;
y = stream_read_dword_le(s);
y|=(uint64_t)stream_read_dword_le(s)<<32;
return y;
}