diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-08-17 13:14:22 +0200 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-08-17 15:48:12 -0700 |
commit | 0638a91ff4dfbec2b3e1db0375af068ef2e7b855 (patch) | |
tree | db51131a43343bb0fdc8407f02deeb326c1350ec /audio | |
parent | 08dd30fde839d36b9df68ae20c959f880857d8bc (diff) | |
download | mpv-0638a91ff4dfbec2b3e1db0375af068ef2e7b855.tar.bz2 mpv-0638a91ff4dfbec2b3e1db0375af068ef2e7b855.tar.xz |
ao_pipewire: report all available info about chunk
This allows the audio server better to make sense of the data instead of
having to use heuristics.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/out/ao_pipewire.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index a59750355a..a54a4c828c 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -134,8 +134,8 @@ static void on_process(void *userdata) for (int i = 0; i < buf->n_datas; i++) { data[i] = buf->datas[i].data; - buf->datas[i].chunk->size = bytes_per_channel; buf->datas[i].chunk->offset = 0; + buf->datas[i].chunk->stride = ao->sstride; } pw_stream_get_time_n(p->stream, &time, sizeof(time)); @@ -152,6 +152,10 @@ static void on_process(void *userdata) int samples = ao_read_data(ao, data, nframes, end_time); b->size = samples; + for (int i = 0; i < buf->n_datas; i++) { + buf->datas[i].chunk->size = samples * ao->sstride; + } + pw_stream_queue_buffer(p->stream, b); } |