summaryrefslogtreecommitdiff
path: root/libavcodec/vcr1.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-04-13 08:52:08 +0200
committerDiego Biurrun <diego@biurrun.de>2012-05-14 16:19:14 +0200
commit55da88c5ab546c64cc5310768ad0f2bd81e6e26d (patch)
tree419c70b1337c7877f529062106f05516a79770c2 /libavcodec/vcr1.c
parent5aad8e80a78e6b1f1479aa45d29713d4f44ea0be (diff)
vcr1enc: Replace obsolete get_bit_count by put_bits_count/flush_put_bits.
Diffstat (limited to 'libavcodec/vcr1.c')
-rw-r--r--libavcodec/vcr1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index 7edd801b8f..87b39b0527 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -151,6 +151,9 @@ AVCodec ff_vcr1_decoder = {
#define CONFIG_VCR1_ENCODER 0
#if CONFIG_VCR1_ENCODER
+
+#include "put_bits.h"
+
static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
int buf_size, void *data)
{
@@ -164,10 +167,9 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
p->key_frame = 1;
avpriv_align_put_bits(&a->pb);
- while (get_bit_count(&a->pb) & 31)
- put_bits(&a->pb, 8, 0);
+ flush_put_bits(&a->pb);
- size = get_bit_count(&a->pb) / 32;
+ size = put_bits_count(&a->pb) / 32;
return size * 4;
}