[FFmpeg-devel] [PATCH 2/8] png: Don't fail when a packet is larger than INT_MAX
Donny Yang
work at kota.moe
Sun Mar 29 13:05:41 CEST 2015
Signed-off-by: Donny Yang <work at kota.moe>
---
libavcodec/pngenc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 3697dbb..bd3aae5 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -373,8 +373,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
enc_row_size +
12 * (((int64_t)enc_row_size + IOBUF_SIZE - 1) / IOBUF_SIZE) // 12 * ceil(enc_row_size / IOBUF_SIZE)
);
- if (max_packet_size > INT_MAX)
- return AVERROR(ENOMEM);
ret = ff_alloc_packet2(avctx, pkt, max_packet_size < FF_MIN_BUFFER_SIZE ? FF_MIN_BUFFER_SIZE : max_packet_size);
if (ret)
return ret;
--
2.3.4
More information about the ffmpeg-devel
mailing list