diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-27 17:11:27 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-05 12:44:04 +0200 |
commit | 72c521e80af9ff9b8ab7145e4af973c5e2969840 (patch) | |
tree | cb90b2d5a92d365bfcd458254ae88afc68de1683 /libavcodec/dcaenc.c | |
parent | 350c00f3dfc8c005ef4e85c123afb67a34cfad4b (diff) | |
download | ffmpeg-72c521e80af9ff9b8ab7145e4af973c5e2969840.tar.gz |
avcodec/dcaenc: Don't write one bit at a time
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dcaenc.c')
-rw-r--r-- | libavcodec/dcaenc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index bd08ccd331..76f1f141d1 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -1206,14 +1206,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); + memset(put_bits_ptr(&c->pb), 0, put_bytes_left(&c->pb, 0)); avpkt->pts = frame->pts; - avpkt->size = put_bytes_output(&c->pb); avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples); *got_packet_ptr = 1; return 0; |