diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2021-08-24 09:43:42 -0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-08-26 09:20:56 +0200 |
commit | 521388edb7d3c176b444bbc3a42723cbafab2d55 (patch) | |
tree | 98e1fdb1991b3cd816f83228b510a8c402d73681 /libavcodec/wmaprodec.c | |
parent | c1c7f2b61f30a2a7c3a3a9bfa892dfc3b2bda21c (diff) | |
download | ffmpeg-521388edb7d3c176b444bbc3a42723cbafab2d55.tar.gz |
avcodec/wma: Return specific error code
This way, the calling function can just forward it instead of
making it up.
Signed-off-by: Olivier CrĂȘte <olivier.crete@collabora.com>
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r-- | libavcodec/wmaprodec.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index e0d00d2d37..3e7ec1a8b9 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -991,13 +991,16 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c) /** decode run level coded coefficients */ if (cur_coeff < s->subframe_len) { + int ret; + memset(&ci->coeffs[cur_coeff], 0, sizeof(*ci->coeffs) * (s->subframe_len - cur_coeff)); - if (ff_wma_run_level_decode(s->avctx, &s->gb, vlc, - level, run, 1, ci->coeffs, - cur_coeff, s->subframe_len, - s->subframe_len, s->esc_len, 0)) - return AVERROR_INVALIDDATA; + ret = ff_wma_run_level_decode(s->avctx, &s->gb, vlc, + level, run, 1, ci->coeffs, + cur_coeff, s->subframe_len, + s->subframe_len, s->esc_len, 0); + if (ret < 0) + return ret; } return 0; |