1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/mpegvideo_enc: Check FLV1 resolution limits

Found-by: Elias Myllymäki <elias.myllymaki04p@gmail.com>
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-01-08 02:59:28 +01:00
parent 402824e9e9
commit 827c073154

View File

@ -567,6 +567,12 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n"); av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (s->codec_id == AV_CODEC_ID_FLV1 &&
(avctx->width > 65535 ||
avctx->height > 65535 )) {
av_log(avctx, AV_LOG_ERROR, "FLV does not support resolutions above 16bit\n");
return AVERROR(EINVAL);
}
if ((s->codec_id == AV_CODEC_ID_H263 || if ((s->codec_id == AV_CODEC_ID_H263 ||
s->codec_id == AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263P ||
s->codec_id == AV_CODEC_ID_RV20) && s->codec_id == AV_CODEC_ID_RV20) &&