[FFmpeg-cvslog] libilbc: use ff_alloc_packet2

Paul B Mahol git at videolan.org
Wed Mar 6 11:55:14 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Mar  6 10:42:10 2013 +0000| [037adf589a8ea5137fc7e302106e4640afcc04a0] | committer: Paul B Mahol

libilbc: use ff_alloc_packet2

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=037adf589a8ea5137fc7e302106e4640afcc04a0
---

 libavcodec/libilbc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 56cb51f..9805348 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -182,10 +182,8 @@ static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     ILBCEncContext *s = avctx->priv_data;
     int ret;
 
-    if ((ret = ff_alloc_packet(avpkt, 50))) {
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
+    if ((ret = ff_alloc_packet2(avctx, avpkt, 50)) < 0)
         return ret;
-    }
 
     WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->data, (const WebRtc_Word16*) frame->data[0], &s->encoder);
 



More information about the ffmpeg-cvslog mailing list