diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-01-11 08:31:06 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-12 01:25:21 +0300 |
commit | 8250bb49b19d50d8c8384ebec79371d59d0ccf21 (patch) | |
tree | 65caaaded3b285c6f8cdbeda6ca8f47d1b4ebf5c /libavcodec/wavpack.c | |
parent | 1a7f4a122e419f108bb31d4abc75045bfdc29319 (diff) |
avcodec/wavpack: simplify the code
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index d0242809fe..edc0f7911d 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1114,9 +1114,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data, avctx->bits_per_raw_sample = ((frame_flags & 0x03) + 1) << 3; } - while (buf_size > 0) { - if (buf_size <= WV_HEADER_SIZE) - break; + while (buf_size > WV_HEADER_SIZE) { frame_size = AV_RL32(buf + 4) - 12; buf += 20; buf_size -= 20; |