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:
authorPaul B Mahol <onemda@gmail.com>2016-01-25 18:03:17 +0300
committerPaul B Mahol <onemda@gmail.com>2016-01-25 19:10:49 +0300
commit06f65fd026a1a329ecb151f07fc08ca68499cad7 (patch)
treed278d0c4556c0f74ead3b8da83371ec28568a1b8 /libavcodec/dcaenc.c
parented0c550564a8502210e8c8c6cd5604ca1f390cd9 (diff)
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.c4
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;
}