flacdec: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Mon, 3 Jun 2013 19:21:17 +0000 (19:21 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 3 Jun 2013 19:24:15 +0000 (19:24 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/flacdec.c

index 1bf6dc7..e3c3175 100644 (file)
@@ -529,7 +529,8 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     /* decode frame */
-    init_get_bits(&s->gb, buf, buf_size*8);
+    if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
+        return ret;
     if ((ret = decode_frame(s)) < 0) {
         av_log(s->avctx, AV_LOG_ERROR, "decode_frame() failed\n");
         return ret;