aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-04 03:11:15 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-26 16:58:31 +0100
commit27ffd266fce440a3d13bf4192d7febd1e7aaca99 (patch)
tree5eb8f76be998e39a5ee4923e58cd5bc31041ce61 /libavcodec
parent3d1cbf388da79b203cdad9ca0046df33b47da476 (diff)
downloadffmpeg-27ffd266fce440a3d13bf4192d7febd1e7aaca99.tar.gz
avcodec/dcaenc: clear bitstream end
This avoids leaving uninitialized bits in the output Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e322b7061f873e8fd33b9e518caa19b87616a528) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dcaenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 905cdc9ade..182494a208 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -939,6 +939,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
for (i = 0; i < SUBFRAMES; i++)
put_subframe(c, i);
+
+ for (i = put_bits_count(&c->pb); i < 8*c->frame_size; i++)
+ put_bits(&c->pb, 1, 0);
+
flush_put_bits(&c->pb);
avpkt->pts = frame->pts;