mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Fix bug in bitreader handling of read callback returning a short count (SF#2490454: https://sourceforge.net/tracker2/?func=detail&aid=2490454&group_id=13478&atid=113478)
This commit is contained in:
@@ -272,10 +272,11 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
||||
;; edi uval
|
||||
;; ebp br
|
||||
mov edx, [ebp + 12] ; edx <- br->bytes
|
||||
test edx, edx
|
||||
jz .read1 ; if(br->bytes) { [NOTE: this case is rare so it doesn't have to be all that fast ]
|
||||
shl edx, 3 ; edx <- br->bytes*8
|
||||
cmp edx, ecx
|
||||
jbe .read1 ; if(br->bytes*8 > cbits) { [NOTE: this case is rare so it doesn't have to be all that fast ]
|
||||
mov ebx, [ebp]
|
||||
shl edx, 3 ; edx <- const unsigned end = br->bytes * 8;
|
||||
; edx <- const unsigned end = br->bytes * 8;
|
||||
mov eax, [ebx + 4*esi] ; b = br->buffer[cwords]
|
||||
xchg edx, ecx ; [edx <- cbits , ecx <- end]
|
||||
mov ebx, 0xffffffff ; ebx <- FLAC__WORD_ALL_ONES
|
||||
@@ -296,7 +297,7 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
||||
.c1_next3: ; } else {
|
||||
sub edi, ecx
|
||||
add edi, edx ; uval += end - cbits;
|
||||
add ecx, edx ; cbits += end
|
||||
mov ecx, edx ; cbits = end
|
||||
; /* didn't find stop bit yet, have to keep going... */
|
||||
; }
|
||||
; }
|
||||
|
||||
Reference in New Issue
Block a user