mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
adapter: add Header metadata by default
Firefox needs this but we should eventually check the Meta Params to decide on this.
This commit is contained in:
parent
81408597f4
commit
8d7175a1e7
1 changed files with 4 additions and 1 deletions
|
|
@ -403,6 +403,7 @@ static int negotiate_buffers(struct impl *this)
|
||||||
uint32_t i, size, buffers, blocks, align, flags, stride = 0;
|
uint32_t i, size, buffers, blocks, align, flags, stride = 0;
|
||||||
uint32_t *aligns;
|
uint32_t *aligns;
|
||||||
struct spa_data *datas;
|
struct spa_data *datas;
|
||||||
|
struct spa_meta metas[1];
|
||||||
uint64_t follower_flags, conv_flags;
|
uint64_t follower_flags, conv_flags;
|
||||||
|
|
||||||
spa_log_debug(this->log, "%p: n_buffers:%d", this, this->n_buffers);
|
spa_log_debug(this->log, "%p: n_buffers:%d", this, this->n_buffers);
|
||||||
|
|
@ -484,9 +485,11 @@ static int negotiate_buffers(struct impl *this)
|
||||||
datas[i].maxsize = size;
|
datas[i].maxsize = size;
|
||||||
aligns[i] = align;
|
aligns[i] = align;
|
||||||
}
|
}
|
||||||
|
metas[0].type = SPA_META_Header;
|
||||||
|
metas[0].size = sizeof(struct spa_meta_header);
|
||||||
|
|
||||||
free(this->buffers);
|
free(this->buffers);
|
||||||
this->buffers = spa_buffer_alloc_array(buffers, flags, 0, NULL, blocks, datas, aligns);
|
this->buffers = spa_buffer_alloc_array(buffers, flags, 1, metas, blocks, datas, aligns);
|
||||||
if (this->buffers == NULL)
|
if (this->buffers == NULL)
|
||||||
return -errno;
|
return -errno;
|
||||||
this->n_buffers = buffers;
|
this->n_buffers = buffers;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue