alac: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Wed, 29 May 2013 12:37:33 +0000 (12:37 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 29 May 2013 12:37:33 +0000 (12:37 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/alac.c

index 0018b9a..751b40b 100644 (file)
@@ -443,7 +443,8 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
     int channels;
     int ch, ret, got_end;
 
-    init_get_bits(&alac->gb, avpkt->data, avpkt->size * 8);
+    if ((ret = init_get_bits8(&alac->gb, avpkt->data, avpkt->size)) < 0)
+        return ret;
 
     got_end = 0;
     alac->nb_samples = 0;