Browse Source

avcodec/cngenc: Use ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
0508657f42
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/cngenc.c

+ 2
- 2
libavcodec/cngenc.c View File

@@ -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;
}


Loading…
Cancel
Save