summaryrefslogtreecommitdiff
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index bb9bc8d236..6365fe7f47 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -585,11 +585,14 @@ static int wma_decode_block(WMACodecContext *s)
decode_exp_lsp(s, ch);
}
s->exponents_bsize[ch] = bsize;
+ s->exponents_initialized[ch] = 1;
}
}
- s->exponents_initialized = 1;
- }else if (!s->exponents_initialized) {
- return AVERROR_INVALIDDATA;
+ }
+
+ for (ch = 0; ch < s->avctx->channels; ch++) {
+ if (s->channel_coded[ch] && !s->exponents_initialized[ch])
+ return AVERROR_INVALIDDATA;
}
/* parse spectral coefficients : just RLE encoding */