[FFmpeg-cvslog] libspeexenc: switch to ff_alloc_packet2().
Michael Niedermayer
git at videolan.org
Thu Mar 22 19:10:29 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 15:00:47 2012 +0100| [f3b10d38d7030ac543803db0f15b041109c8f463] | committer: Michael Niedermayer
libspeexenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3b10d38d7030ac543803db0f15b041109c8f463
---
libavcodec/libspeexenc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 2d24e6a..2a690de 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);
More information about the ffmpeg-cvslog
mailing list