From bcd4aa8bec19a17bd633e3db13357784c05b6ca5 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 5 Sep 2011 12:37:50 +0200 Subject: [PATCH] wavpack: fix wrong return value in wavpack_decode_block() This function should return number of samples decoded, not number of bytes decoded. Spotted by Uoti Urpala. Signed-off-by: Luca Barbato --- libavcodec/wavpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index ea5dfbae16..22fab3804c 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -780,7 +780,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, s->samples = AV_RL32(buf); buf += 4; if(!s->samples){ *data_size = 0; - return buf_size; + return 0; } }else{ s->samples = wc->samples;