[FFmpeg-cvslog] lclenc: switch to ff_alloc_packet2()
Michael Niedermayer
git at videolan.org
Thu Mar 22 19:10:26 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 04:25:20 2012 +0100| [620559e37b4e3cd74858b89c05c30d4215428000] | committer: Michael Niedermayer
lclenc: 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=620559e37b4e3cd74858b89c05c30d4215428000
---
libavcodec/lclenc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index a656986..854968b 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -42,6 +42,7 @@
#include <stdlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "lcl.h"
#include <zlib.h>
@@ -77,9 +78,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int zret; // Zlib return code
int max_size = deflateBound(&c->zstream, avctx->width * avctx->height * 3);
- if (!pkt->data &&
- (ret = av_new_packet(pkt, max_size)) < 0) {
- av_log(avctx, AV_LOG_ERROR, "Error allocating packet of size %d.\n", max_size);
+ if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0) {
return ret;
}
More information about the ffmpeg-cvslog
mailing list