diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-19 08:50:58 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-19 08:50:58 +0000 |
commit | 46afe7d1d271f865566fcb838d95e256c4b7637a (patch) | |
tree | 222d4677dcf8c5a13e370dba9031d06d9389fc69 /stream/stream.h | |
parent | 3988488e7684cb7700af59318c2b5468090e778d (diff) | |
download | mpv-46afe7d1d271f865566fcb838d95e256c4b7637a.tar.bz2 mpv-46afe7d1d271f865566fcb838d95e256c4b7637a.tar.xz |
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
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/stream/stream.h b/stream/stream.h index 259c4736e9..a961338a75 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -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; } |