[FFmpeg-cvslog] avcodec/cfhd: use init_get_bits8()

Paul B Mahol git at videolan.org
Sun Aug 9 19:48:57 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Aug  9 11:54:52 2020 +0200| [3ff7171a8524cf1e49bbfc6528c02a205b0f4fac] | committer: Paul B Mahol

avcodec/cfhd: use init_get_bits8()

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

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

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 41b6f4f5ee..2d3c402e39 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -815,7 +815,9 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
 
             av_log(avctx, AV_LOG_DEBUG, "Start subband coeffs plane %i level %i codebook %i expected %i\n", s->channel_num, s->level, s->codebook, expected);
 
-            init_get_bits(&s->gb, gb.buffer, bytestream2_get_bytes_left(&gb) * 8);
+            ret = init_get_bits8(&s->gb, gb.buffer, bytestream2_get_bytes_left(&gb));
+            if (ret < 0)
+                goto end;
             {
                 OPEN_READER(re, &s->gb);
 



More information about the ffmpeg-cvslog mailing list