mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 11:22:14 +00:00
libspeexenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bb84112bae
commit
f3b10d38d7
@ -267,8 +267,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
/* write output if all frames for the packet have been encoded */
|
||||
if (s->pkt_frame_count == s->frames_per_packet) {
|
||||
s->pkt_frame_count = 0;
|
||||
if ((ret = ff_alloc_packet(avpkt, speex_bits_nbytes(&s->bits)))) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits)))) {
|
||||
return ret;
|
||||
}
|
||||
ret = speex_bits_write(&s->bits, avpkt->data, avpkt->size);
|
||||
|
Loading…
Reference in New Issue
Block a user