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

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


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

tiffenc: 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=219d8245a0ff2cad480ba5399b349825f7b2cee2
---

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

diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 8cda2b2..e206cd3 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -29,6 +29,7 @@
 #include "libavutil/opt.h"
 
 #include "avcodec.h"
+#include "internal.h"
 #if CONFIG_ZLIB
 #include <zlib.h>
 #endif
@@ -303,10 +304,8 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
 
     strips = (s->height - 1) / s->rps + 1;
 
-    if (!pkt->data &&
-        (ret = av_new_packet(pkt, avctx->width * avctx->height * s->bpp * 2 +
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * s->bpp * 2 +
                                   avctx->height * 4 + FF_MIN_BUFFER_SIZE)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
         return ret;
     }
     ptr          = pkt->data;



More information about the ffmpeg-cvslog mailing list