1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

ljpegenc: 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:48 +01:00
parent fcd8a3c8c2
commit a895669f53

View File

@ -57,8 +57,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt,
max_pkt_size += mb_width * mb_height * 3 * 4 max_pkt_size += mb_width * mb_height * 3 * 4
* s->mjpeg_hsample[0] * s->mjpeg_vsample[0]; * s->mjpeg_hsample[0] * s->mjpeg_vsample[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;
} }