1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

pnmenc: switch to ff_alloc_packet2().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-22 15:00:49 +01:00
parent 5c6c62543c
commit 6a74c48cf9

View File

@ -32,10 +32,9 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int i, h, h1, c, n, linesize, ret; int i, h, h1, c, n, linesize, ret;
uint8_t *ptr, *ptr1, *ptr2; uint8_t *ptr, *ptr1, *ptr2;
if ((ret = ff_alloc_packet(pkt, avpicture_get_size(avctx->pix_fmt, if ((ret = ff_alloc_packet2(avctx, pkt, avpicture_get_size(avctx->pix_fmt,
avctx->width, avctx->width,
avctx->height) + 200)) < 0) { avctx->height) + 200)) < 0) {
av_log(avctx, AV_LOG_ERROR, "encoded frame too large\n");
return ret; return ret;
} }