lavc/tta: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Wed, 29 May 2013 12:27:41 +0000 (12:27 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 29 May 2013 12:30:07 +0000 (12:30 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/tta.c

index cd00b88..fd796d9 100644 (file)
@@ -329,7 +329,8 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
             return AVERROR_INVALIDDATA;
     }
 
-    init_get_bits(&s->gb, buf, buf_size*8);
+    if ((ret = init_get_bits8(&s->gb, avpkt->data, avpkt->size)) < 0)
+        return ret;
 
     /* get output buffer */
     frame->nb_samples = framelen;