-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(amf): add max_au_size option to prevent FEC bypass on Wi-Fi #4926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -776,6 +776,7 @@ namespace video { | |||||||||||||||||||
| {"usage"s, &config::video.amd.amd_usage_hevc}, | ||||||||||||||||||||
| {"vbaq"s, &config::video.amd.amd_vbaq}, | ||||||||||||||||||||
| {"enforce_hrd"s, &config::video.amd.amd_enforce_hrd}, | ||||||||||||||||||||
| {"max_au_size"s, &config::video.amd.amd_max_au_size}, | ||||||||||||||||||||
|
||||||||||||||||||||
| {"max_au_size"s, &config::video.amd.amd_max_au_size}, | |
| {"max_au_size"s, []() { | |
| // Config/UI use bytes; FFmpeg AMF option expects bits. Negative disables (maps to -1). | |
| const int value_bytes = config::video.amd.amd_max_au_size; | |
| if (value_bytes < 0) { | |
| return -1; | |
| } | |
| return value_bytes * 8; | |
| }}, |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: the FFmpeg "max_au_size" option is in bits. Passing the config value through as-is while documenting bytes will lead to an incorrect cap. Consider converting bytes->bits (and treating 0/empty as unset) before setting this option.
| {"max_au_size"s, &config::video.amd.amd_max_au_size}, | |
| {"max_au_size"s, []() { | |
| const auto bytes = config::video.amd.amd_max_au_size; | |
| if (bytes <= 0) { | |
| return 0; | |
| } | |
| return bytes * 8; | |
| }}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parses amd_max_au_size as an optional int but does not enforce non-negative values, and it will treat an explicit "0" as a configured value (so it will still be passed through to FFmpeg). If the intent is “0/empty disables”, consider normalizing values <= 0 to nullopt here (or validating a non-negative range) so downstream option application can skip setting the codec option entirely.