adpcm-xq: try decoding anyway
thanks Architect!
This commit is contained in:
parent
c078593768
commit
a8a57342ed
1 changed files with 3 additions and 1 deletions
4
extern/adpcm-xq-s/adpcm-lib.c
vendored
4
extern/adpcm-xq-s/adpcm-lib.c
vendored
|
|
@ -352,8 +352,10 @@ int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize,
|
|||
*outbuf++ = pcmdata[0] = (int16_t) (inbuf [0] | (inbuf [1] << 8));
|
||||
index[0] = inbuf [2];
|
||||
|
||||
// tildearrow: don't return if this fails. try decoding a corrupt sample anyway.
|
||||
// thanks Architect!
|
||||
if (index [0] < 0 || index [0] > 88 || inbuf [3]) // sanitize the input a little...
|
||||
return 0;
|
||||
index[0] = 0;
|
||||
|
||||
inbufsize -= 4;
|
||||
inbuf += 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue