Fixes ticket #10053. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavcodec/flashsvenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 35793400fa..9d065bb92d 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -229,7 +229,8 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, I_frame = 1; } - if ((res = ff_alloc_packet(avctx, pkt, s->image_width * s->image_height * 3)) < 0) + res = ff_alloc_packet(avctx, pkt, 4U + s->image_width * s->image_height * 3); + if (res < 0) return res; pkt->size = encode_bitstream(s, p, pkt->data, pkt->size, opt_w * 16, opt_h * 16, -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".