Browse Source

libspeexenc: switch to ff_alloc_packet2().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
f3b10d38d7
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/libspeexenc.c

+ 1
- 2
libavcodec/libspeexenc.c View File

@@ -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…
Cancel
Save