aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-01-11 13:31:06 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-11 23:25:21 +0100
commit8250bb49b19d50d8c8384ebec79371d59d0ccf21 (patch)
tree65caaaded3b285c6f8cdbeda6ca8f47d1b4ebf5c
parent1a7f4a122e419f108bb31d4abc75045bfdc29319 (diff)
downloadffmpeg-8250bb49b19d50d8c8384ebec79371d59d0ccf21.tar.gz
avcodec/wavpack: simplify the code
Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wavpack.c4
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;