mirror of https://git.ffmpeg.org/ffmpeg.git
pcxenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
11e8f3e7a2
commit
d2c4b3754d
|
@ -153,8 +153,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||||
line_bytes = (line_bytes + 1) & ~1;
|
line_bytes = (line_bytes + 1) & ~1;
|
||||||
|
|
||||||
max_pkt_size = 128 + avctx->height * 2 * line_bytes * nplanes + (pal ? 256*3 + 1 : 0);
|
max_pkt_size = 128 + avctx->height * 2 * line_bytes * nplanes + (pal ? 256*3 + 1 : 0);
|
||||||
if ((ret = ff_alloc_packet(pkt, max_pkt_size)) < 0) {
|
if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n", max_pkt_size);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
buf = pkt->data;
|
buf = pkt->data;
|
||||||
|
|
Loading…
Reference in New Issue