wavpack: fix wrong return value in wavpack_decode_block()
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 5 Sep 2011 10:37:50 +0000 (12:37 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 5 Sep 2011 10:44:26 +0000 (12:44 +0200)
This function should return number of samples decoded, not number of bytes
decoded.
Spotted by Uoti Urpala.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/wavpack.c

index ea5dfba..22fab38 100644 (file)
@@ -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;