summaryrefslogtreecommitdiff
path: root/libavcodec/xwdenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-22 15:00:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-22 19:03:22 +0100
commita3f36b09e75f01e7a1a506e635401cbc5a5f65c9 (patch)
tree06a3f8d8022d5a6909b0852c512e039548d2b18e /libavcodec/xwdenc.c
parent5d8a20a1c53187360aaad70e95d8c3fbe6db169a (diff)
downloadffmpeg-a3f36b09e75f01e7a1a506e635401cbc5a5f65c9.tar.gz
xwdenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/xwdenc.c')
-rw-r--r--libavcodec/xwdenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c
index 8c98ef9f5d..d8001e4ac9 100644
--- a/libavcodec/xwdenc.c
+++ b/libavcodec/xwdenc.c
@@ -148,8 +148,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
header_size = XWD_HEADER_SIZE + WINDOW_NAME_SIZE;
out_size = header_size + ncolors * XWD_CMAP_SIZE + avctx->height * lsize;
- if ((ret = ff_alloc_packet(pkt, out_size)) < 0) {
- av_log(avctx, AV_LOG_ERROR, "output buffer too small\n");
+ if ((ret = ff_alloc_packet2(avctx, pkt, out_size)) < 0) {
return ret;
}
buf = pkt->data;