diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-01-25 16:03:17 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-01-25 17:10:49 +0100 |
commit | 06f65fd026a1a329ecb151f07fc08ca68499cad7 (patch) | |
tree | d278d0c4556c0f74ead3b8da83371ec28568a1b8 /libavcodec/dcaenc.c | |
parent | ed0c550564a8502210e8c8c6cd5604ca1f390cd9 (diff) | |
download | ffmpeg-06f65fd026a1a329ecb151f07fc08ca68499cad7.tar.gz |
avcodec/dcaenc: return correct number of bytes in output packet
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/dcaenc.c')
-rw-r--r-- | libavcodec/dcaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index b0cb2fb950..ac933dcc1f 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -938,7 +938,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const int32_t *samples; int ret, i; - if ((ret = ff_alloc_packet2(avctx, avpkt, c->frame_size , 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, avpkt, c->frame_size, 0)) < 0) return ret; samples = (const int32_t *)frame->data[0]; @@ -968,7 +968,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, avpkt->pts = frame->pts; avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples); - avpkt->size = c->frame_size + 1; + avpkt->size = put_bits_count(&c->pb) >> 3; *got_packet_ptr = 1; return 0; } |