[2/4] asvenc: make safe for 64bit put_bits

Message ID 20170226175813.20428-3-stebbins@jetheaddev.com
State New
Headers show

Commit Message

John Stebbins Feb. 26, 2017, 5:58 p.m.
Adds explicit call to flush_put_bits instead of assuming put_bits
caches 32bits
---
 libavcodec/asvenc.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index ac7c317..9f85710 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -258,6 +258,7 @@  static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     while (put_bits_count(&a->pb) & 31)
         put_bits(&a->pb, 8, 0);
 
+    flush_put_bits(&a->pb);
     size = put_bits_count(&a->pb) / 32;
 
     if (avctx->codec_id == AV_CODEC_ID_ASV1) {