Commit f3b10d38 authored by Michael Niedermayer's avatar Michael Niedermayer

libspeexenc: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bb84112b
...@@ -267,8 +267,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ...@@ -267,8 +267,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* write output if all frames for the packet have been encoded */ /* write output if all frames for the packet have been encoded */
if (s->pkt_frame_count == s->frames_per_packet) { if (s->pkt_frame_count == s->frames_per_packet) {
s->pkt_frame_count = 0; s->pkt_frame_count = 0;
if ((ret = ff_alloc_packet(avpkt, speex_bits_nbytes(&s->bits)))) { if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits)))) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
return ret; return ret;
} }
ret = speex_bits_write(&s->bits, avpkt->data, avpkt->size); ret = speex_bits_write(&s->bits, avpkt->data, avpkt->size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment