Commit fd0ebdd7 authored by Wim Taymans's avatar Wim Taymans
Browse files

stream: only set MAPPED flag when mmaped

parent 4743a423
Pipeline #160932 passed with stages
in 1 minute and 38 seconds
......@@ -677,6 +677,7 @@ static int impl_port_use_buffers(void *object,
d->type == SPA_DATA_DmaBuf) {
if ((res = map_data(impl, d, prot)) < 0)
return res;
SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
}
else if (d->data == NULL) {
pw_log_error(NAME" %p: invalid buffer mem", filter);
......@@ -684,7 +685,6 @@ static int impl_port_use_buffers(void *object,
}
buf_size += d->maxsize;
}
SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
if (size > 0 && buf_size != size) {
pw_log_error(NAME" %p: invalid buffer size %d", filter, buf_size);
......
......@@ -669,6 +669,7 @@ static int impl_port_use_buffers(void *object,
d->type == SPA_DATA_DmaBuf) {
if ((res = map_data(impl, d, prot)) < 0)
return res;
SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
}
else if (d->data == NULL) {
pw_log_error(NAME" %p: invalid buffer mem", stream);
......@@ -676,7 +677,6 @@ static int impl_port_use_buffers(void *object,
}
buf_size += d->maxsize;
}
SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
if (size > 0 && buf_size != size) {
pw_log_error(NAME" %p: invalid buffer size %d", stream, buf_size);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment