[FFmpeg-cvslog] y41penc: switch to ff_alloc_packet2().

Michael Niedermayer git at videolan.org
Thu Mar 22 19:10:43 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 15:00:50 2012 +0100| [7959eb0d1267b9d0bcf8db663b963401fec466c5] | committer: Michael Niedermayer

y41penc: 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=7959eb0d1267b9d0bcf8db663b963401fec466c5
---

 libavcodec/y41penc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index 5777125..05bac7d 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -48,8 +48,7 @@ static int y41p_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet(pkt, avctx->width * avctx->height * 1.5)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 1.5)) < 0) {
         return ret;
     }
 



More information about the ffmpeg-cvslog mailing list