Mercurial > mplayer.hg
changeset 24079:f40ff9321699
Fix a bug in stream_read_qword_le due to sign extension from int to uint64_t.
Patch by Sean Veers [cf3cf3 gmail com]
author | reimar |
---|---|
date | Sun, 19 Aug 2007 08:50:58 +0000 |
parents | f149d340ffe4 |
children | 97a8394bec58 |
files | stream/stream.h |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream.h Sat Aug 18 22:47:24 2007 +0000 +++ b/stream/stream.h Sun Aug 19 08:50:58 2007 +0000 @@ -186,14 +186,8 @@ 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; }