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

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


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

v308enc: 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=f234b02c940eb6aba06390cde9b51749f7d6060d
---

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

diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index d6598d2..c728b01 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -48,8 +48,7 @@ static int v308_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 * 3)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 3)) < 0) {
         return ret;
     }
     dst = pkt->data;



More information about the ffmpeg-cvslog mailing list