summaryrefslogtreecommitdiff
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 17c54900f7..055bfd0d04 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1450,7 +1450,7 @@ static int decode_frame(AVCodecContext *avctx,
// check for size of decoded data
size = ctx->cur_frame_length * avctx->channels *
- (av_get_bits_per_sample_fmt(avctx->sample_fmt) >> 3);
+ av_get_bytes_per_sample(avctx->sample_fmt);
if (size > *data_size) {
av_log(avctx, AV_LOG_ERROR, "Decoded data exceeds buffer size.\n");
@@ -1714,7 +1714,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
ctx->crc_buffer = av_malloc(sizeof(*ctx->crc_buffer) *
ctx->cur_frame_length *
avctx->channels *
- (av_get_bits_per_sample_fmt(avctx->sample_fmt) >> 3));
+ av_get_bytes_per_sample(avctx->sample_fmt));
if (!ctx->crc_buffer) {
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
decode_end(avctx);