Commit d2581dcc authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

mjpegenc: add a limit for maximum supported resolution

jpeg does not allow more than 65000 pixels for width and height
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 320e537b
......@@ -48,6 +48,11 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
{
MJpegContext *m;
if (s->width > 65500 || s->height > 65500) {
av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n");
return -1;
}
m = av_malloc(sizeof(MJpegContext));
if (!m)
return -1;
......
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