plugins: just check the data pointer

We don't need to look at the data type, we just just be happy when
the data pointer is filled in.
This commit is contained in:
Wim Taymans 2019-10-16 12:23:42 +02:00
parent 8899d00bfc
commit c8ffcaaefe
20 changed files with 20 additions and 66 deletions

View file

@ -564,9 +564,7 @@ impl_node_port_use_buffers(void *object,
b->h = spa_buffer_find_meta_data(b->buf, SPA_META_Header, sizeof(*b->h));
if (!((d[0].type == SPA_DATA_MemFd ||
d[0].type == SPA_DATA_DmaBuf ||
d[0].type == SPA_DATA_MemPtr) && d[0].data != NULL)) {
if (d[0].data == NULL) {
spa_log_error(this->log, NAME " %p: need mapped memory", this);
return -EINVAL;
}