[FFmpeg-cvslog] avcodec/mpegvideo_enc: Check FLV1 resolution limits
Michael Niedermayer
git at videolan.org
Thu Feb 27 19:08:47 EET 2025
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 8 02:59:28 2025 +0100| [43b8852feba98ac668c217d331857706f5174396] | committer: Michael Niedermayer
avcodec/mpegvideo_enc: Check FLV1 resolution limits
Found-by: Elias Myllymäki <elias.myllymaki04p at gmail.com>
Reviewed-by: Alexander Strasser <eclipse7 at gmx.net>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 827c073154f4cc17d1bd3777dff3b58370210bcb)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43b8852feba98ac668c217d331857706f5174396
---
libavcodec/mpegvideo_enc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d42f2db862..b5c3f6f612 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -562,6 +562,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n");
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 ||
s->codec_id == AV_CODEC_ID_H263P) &&
((avctx->width &3) ||
More information about the ffmpeg-cvslog
mailing list