[FFmpeg-cvslog] flacdec: use init_get_bits8()

Paul B Mahol git at videolan.org
Mon Jun 3 21:24:25 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Jun  3 19:21:17 2013 +0000| [b4d4ef55294fcf0da6fa8eda2a1be4bdabf7b41c] | committer: Paul B Mahol

flacdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4d4ef55294fcf0da6fa8eda2a1be4bdabf7b41c
---

 libavcodec/flacdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 1bf6dc7..e3c3175 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list