diff mbox series

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

Message ID 20200111053106.23490-1-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,v1] avcodec/wavpack: simplify the code
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang Jan. 11, 2020, 5:31 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

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

Comments

Michael Niedermayer Jan. 11, 2020, 10:31 p.m. UTC | #1
On Sat, Jan 11, 2020 at 01:31:06PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavcodec/wavpack.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

will apply

thx

[...]
diff mbox series

Patch

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;