mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-17 14:33:04 -04:00
compress-offload: fix fragment count validation in set_params
Fix incorrect assertion condition that compares fragment_size with max_fragments instead of num_fragments. The condition should validate num_fragments range, not mix fragment_size with max_fragments limit.
This commit is contained in:
parent
8d1fc2cebd
commit
8b926ff084
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ int compress_offload_api_set_params(struct compress_offload_api_context *context
|
|||
);
|
||||
assert(
|
||||
(num_fragments == 0) ||
|
||||
((num_fragments >= context->caps.min_fragments) && (fragment_size <= context->caps.max_fragments))
|
||||
((num_fragments >= context->caps.min_fragments) && (num_fragments <= context->caps.max_fragments))
|
||||
);
|
||||
|
||||
context->fragment_size = (fragment_size != 0) ? fragment_size : context->caps.min_fragment_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue