[FFmpeg-cvslog] avcodec/wavpack: simplify the code

Limin Wang git at videolan.org
Sun Jan 12 19:53:28 EET 2020


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Sat Jan 11 13:31:06 2020 +0800| [8250bb49b19d50d8c8384ebec79371d59d0ccf21] | committer: Michael Niedermayer

avcodec/wavpack: simplify the code

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8250bb49b19d50d8c8384ebec79371d59d0ccf21
---

 libavcodec/wavpack.c | 4 +---
 1 file changed, 1 insertion(+), 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;



More information about the ffmpeg-cvslog mailing list