Commit a895669f authored by Michael Niedermayer's avatar Michael Niedermayer

ljpegenc: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fcd8a3c8
...@@ -57,8 +57,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment