The branch, master has been updated
via 45db6945e960c6fd46e746cdc9de3bc53dc30c4a (commit)
from f4b044bbe3be8c87fa09955e1a4c6b306e55ee06 (commit)
- Log -----------------------------------------------------------------
commit 45db6945e960c6fd46e746cdc9de3bc53dc30c4a
Author: Tong Wu <[email protected]>
AuthorDate: Thu Sep 4 06:51:24 2025 +0800
Commit: Timo Rothenpieler <[email protected]>
CommitDate: Mon Sep 8 00:19:06 2025 +0000
avcodec/vaapi_encode: avoid potential overflow
The max_frame_size in byte will be filled in
VAEncMiscParameterBufferMaxFrameSize which receives size in bit.
This requires max_frame_size * 8.
Signed-off-by: Tong Wu <[email protected]>
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h
index 8e3eab9f27..1fa1e99a31 100644
--- a/libavcodec/vaapi_encode.h
+++ b/libavcodec/vaapi_encode.h
@@ -360,7 +360,7 @@ int ff_vaapi_encode_close(AVCodecContext *avctx);
{ "max_frame_size", \
"Maximum frame size (in bytes)",\
OFFSET(common.max_frame_size), AV_OPT_TYPE_INT, \
- { .i64 = 0 }, 0, INT_MAX, FLAGS }
+ { .i64 = 0 }, 0, INT_MAX / 8, FLAGS }
#define VAAPI_ENCODE_RC_MODE(name, desc) \
{ #name, desc, 0, AV_OPT_TYPE_CONST, { .i64 = RC_MODE_ ## name }, \
-----------------------------------------------------------------------
Summary of changes:
libavcodec/vaapi_encode.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]