[FFmpeg-devel] [PATCH v1] avcodec/wavpack: simplify the code

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sat Jan 11 07:31:06 EET 2020


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavcodec/wavpack.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index d024280..edc0f79 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;
-- 
2.9.5



More information about the ffmpeg-devel mailing list