You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/dcaenc: Don't write one bit at a time
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1206,14 +1206,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
for (i = 0; i < SUBFRAMES; i++)
|
for (i = 0; i < SUBFRAMES; i++)
|
||||||
put_subframe(c, 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);
|
flush_put_bits(&c->pb);
|
||||||
|
memset(put_bits_ptr(&c->pb), 0, put_bytes_left(&c->pb, 0));
|
||||||
|
|
||||||
avpkt->pts = frame->pts;
|
avpkt->pts = frame->pts;
|
||||||
avpkt->size = put_bytes_output(&c->pb);
|
|
||||||
avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
|
avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
|
||||||
*got_packet_ptr = 1;
|
*got_packet_ptr = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user