summaryrefslogtreecommitdiff
path: root/libavcodec/libspeexenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-22 15:00:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-22 19:03:20 +0100
commitf3b10d38d7030ac543803db0f15b041109c8f463 (patch)
treebf7431c220189b0759e95279058697b8e3ba782c /libavcodec/libspeexenc.c
parentbb84112bae589cd9c5a84931324e8e66ba05c51f (diff)
libspeexenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libspeexenc.c')
-rw-r--r--libavcodec/libspeexenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 2d24e6a605..2a690defee 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -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);