mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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 <wutong1208@outlook.com>
This commit is contained in:
parent
f4b044bbe3
commit
45db6945e9
1 changed files with 1 additions and 1 deletions
|
|
@ -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 }, \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue