summaryrefslogtreecommitdiff
path: root/libavcodec/cngenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-02 23:02:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-02 23:02:12 +0200
commit0508657f42edb511d855b0401e8cf501c0fc61eb (patch)
treee780953a659d5f8fc5a884425e4d665650eb647d /libavcodec/cngenc.c
parent7e9cd4e100086c187c7ad5d8953be3ef282ab497 (diff)
downloadffmpeg-0508657f42edb511d855b0401e8cf501c0fc61eb.tar.gz
avcodec/cngenc: Use ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/cngenc.c')
-rw-r--r--libavcodec/cngenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c
index 58918aa958..302c703f72 100644
--- a/libavcodec/cngenc.c
+++ b/libavcodec/cngenc.c
@@ -75,7 +75,7 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
int qdbov;
int16_t *samples = (int16_t*) frame->data[0];
- if ((ret = ff_alloc_packet(avpkt, 1 + p->order))) {
+ if ((ret = ff_alloc_packet2(avctx, avpkt, 1 + p->order, 1 + p->order))) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
return ret;
}
@@ -97,7 +97,7 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avpkt->data[1 + i] = p->ref_coef[i] * 127 + 127;
*got_packet_ptr = 1;
- avpkt->size = 1 + p->order;
+ av_assert1(avpkt->size == 1 + p->order);
return 0;
}