[FFmpeg-cvslog] avcodec/alsdec: use init_get_bits8()
Paul B Mahol
git at videolan.org
Thu Feb 5 11:02:08 CET 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb 4 13:44:22 2015 +0000| [dccd648f9fa0fbf9b25244d342344a56b181b331] | committer: Paul B Mahol
avcodec/alsdec: 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=dccd648f9fa0fbf9b25244d342344a56b181b331
---
libavcodec/alsdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index cfece44..b3d3086 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1478,7 +1478,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
int invalid_frame, ret;
unsigned int c, sample, ra_frame, bytes_read, shift;
- init_get_bits(&ctx->gb, buffer, buffer_size * 8);
+ if ((ret = init_get_bits8(&ctx->gb, buffer, buffer_size)) < 0)
+ return ret;
// In the case that the distance between random access frames is set to zero
// (sconf->ra_distance == 0) no frame is treated as a random access frame.
More information about the ffmpeg-cvslog
mailing list