mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
libcamera: use the buffer datatype as the port type
In use buffers we need to respect the buffer data type.
This commit is contained in:
parent
ee2df25237
commit
6e0ba50a9c
1 changed files with 8 additions and 1 deletions
|
|
@ -675,7 +675,14 @@ static int spa_libcamera_use_buffers(struct impl *this, struct spa_buffer **buff
|
||||||
if (n_buffers > 0) {
|
if (n_buffers > 0) {
|
||||||
d = buffers[0]->datas;
|
d = buffers[0]->datas;
|
||||||
|
|
||||||
port->memtype = SPA_DATA_DmaBuf;
|
if (d[0].type == SPA_DATA_MemPtr && d[0].data != NULL) {
|
||||||
|
port->memtype = SPA_DATA_MemPtr;
|
||||||
|
} else if (d[0].type == SPA_DATA_DmaBuf) {
|
||||||
|
port->memtype = SPA_DATA_DmaBuf;
|
||||||
|
} else {
|
||||||
|
spa_log_error(this->log, "v4l2: can't use buffers of type %d", d[0].type);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < n_buffers; i++) {
|
for (i = 0; i < n_buffers; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue