Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-04 04:11:15 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-04 05:16:43 +0300
commite322b7061f873e8fd33b9e518caa19b87616a528 (patch)
tree403ab862a6ddf36d82805c6cf4eea7a186c116a5 /libavcodec/dcaenc.c
parentd903b62750b3fe0cd6d66330db0e8f010ae527c1 (diff)
avcodec/dcaenc: clear bitstream end
This avoids leaving uninitialized bits in the output Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dcaenc.c')
-rw-r--r--libavcodec/dcaenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index be26785a9f..23587a7bd7 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -938,6 +938,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;