Commit 8fb7b5f7 authored by Michael Niedermayer's avatar Michael Niedermayer

flashvenc: switch to ff_alloc_packet2()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 487996f6
...@@ -228,10 +228,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -228,10 +228,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
I_frame = 1; I_frame = 1;
} }
if ((res = ff_alloc_packet(pkt, s->image_width * s->image_height * 3)) < 0) { if ((res = ff_alloc_packet2(avctx, pkt, s->image_width * s->image_height * 3)) < 0) {
//Conservative upper bound check for compressed data
av_log(avctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n",
s->image_width * s->image_height * 3);
return res; return res;
} }
......
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