summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac/entropy.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/demac/libdemac/entropy.c')
-rw-r--r--apps/codecs/demac/libdemac/entropy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/entropy.c b/apps/codecs/demac/libdemac/entropy.c
index 54b5cc57b6..24f5932de6 100644
--- a/apps/codecs/demac/libdemac/entropy.c
+++ b/apps/codecs/demac/libdemac/entropy.c
@@ -430,10 +430,13 @@ void ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
430 430
431 ape_ctx->blocksdecoded += blockstodecode; 431 ape_ctx->blocksdecoded += blockstodecode;
432 432
433 if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) { 433 if ((ape_ctx->frameflags & APE_FRAMECODE_LEFT_SILENCE)
434 && ((ape_ctx->frameflags & APE_FRAMECODE_RIGHT_SILENCE)
435 || (decoded1 == NULL))) {
434 /* We are pure silence, just memset the output buffer. */ 436 /* We are pure silence, just memset the output buffer. */
435 memset(decoded0, 0, blockstodecode * sizeof(int32_t)); 437 memset(decoded0, 0, blockstodecode * sizeof(int32_t));
436 memset(decoded1, 0, blockstodecode * sizeof(int32_t)); 438 if (decoded1 != NULL)
439 memset(decoded1, 0, blockstodecode * sizeof(int32_t));
437 } else { 440 } else {
438 if (ape_ctx->fileversion > 3970) { 441 if (ape_ctx->fileversion > 3970) {
439 while (LIKELY(blockstodecode--)) { 442 while (LIKELY(blockstodecode--)) {