summaryrefslogtreecommitdiff
path: root/libavcodec/wmaenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-25 12:52:56 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-03-30 12:36:32 +0200
commitc81b8e04aa0952a7aec1e08940f29ae501fb6bfd (patch)
tree34c1d0dd6c2262ef83efa3ae77ea704580144050 /libavcodec/wmaenc.c
parent73fb1b8a9bd6a563a6b58ce8aa215f2f07e91f57 (diff)
downloadffmpeg-c81b8e04aa0952a7aec1e08940f29ae501fb6bfd.tar.gz
Avoid intermediate bitcount for number of bytes in PutBitContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r--libavcodec/wmaenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 6a7e23d016..4ad37cc70b 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -408,7 +408,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
return AVERROR(EINVAL);
}
av_assert0((put_bits_count(&s->pb) & 7) == 0);
- i= avctx->block_align - (put_bits_count(&s->pb)+7)/8;
+ i = avctx->block_align - put_bytes_count(&s->pb, 0);
av_assert0(i>=0);
while(i--)
put_bits(&s->pb, 8, 'N');