ao_pipewire: fix buffer size calculation

`ao->sstride` is alrady initialized to the same value in `init()`
but in addition it can also handle planar formats.
This commit is contained in:
Misaki Kasumi 2024-03-31 07:31:34 +08:00 committed by sfan5
parent 3086f8fa3e
commit 7f3ca6c524
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ static void on_param_changed(void *userdata, uint32_t id, const struct spa_pod *
if (param == NULL || id != SPA_PARAM_Format)
return;
int buffer_size = ao->device_buffer * af_fmt_to_bytes(ao->format) * ao->channels.num;
int buffer_size = ao->device_buffer * ao->sstride;
params[0] = spa_pod_builder_add_object(&b,
SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,