summaryrefslogtreecommitdiff
path: root/spa/plugins/videotestsrc/videotestsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'spa/plugins/videotestsrc/videotestsrc.c')
-rw-r--r--spa/plugins/videotestsrc/videotestsrc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c
index be8cf93b..3f8cbd24 100644
--- a/spa/plugins/videotestsrc/videotestsrc.c
+++ b/spa/plugins/videotestsrc/videotestsrc.c
@@ -649,16 +649,16 @@ spa_videotestsrc_node_port_use_buffers (SpaNode *node,
b->outstanding = true;
b->h = spa_buffer_find_meta (buffers[i], SPA_META_TYPE_HEADER);
- switch (d[0].type) {
- case SPA_DATA_TYPE_MEMPTR:
- case SPA_DATA_TYPE_MEMFD:
- case SPA_DATA_TYPE_DMABUF:
- if (d[0].data == NULL) {
+ switch (SPA_DATA_MEM_TYPE (&d[0])) {
+ case SPA_MEM_TYPE_MEMPTR:
+ case SPA_MEM_TYPE_MEMFD:
+ case SPA_MEM_TYPE_DMABUF:
+ if (SPA_DATA_MEM_PTR (&d[0]) == NULL) {
spa_log_error (this->log, "videotestsrc %p: invalid memory on buffer %p", this, buffers[i]);
continue;
}
- b->ptr = SPA_MEMBER (d[0].data, d[0].offset, void);
- b->stride = d[0].stride;
+ b->ptr = SPA_DATA_CHUNK_PTR (&d[0]);
+ b->stride = SPA_DATA_CHUNK_STRIDE (&d[0]);
break;
default:
break;