mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
memory: fix is_span
Subtract the offset of the parent from is_span.
This commit is contained in:
parent
17ff81fc7d
commit
7c475cc60f
1 changed files with 8 additions and 2 deletions
|
@ -262,8 +262,14 @@ static gboolean
|
|||
_default_mem_is_span (GstMemoryDefault * mem1, GstMemoryDefault * mem2,
|
||||
gsize * offset)
|
||||
{
|
||||
if (offset)
|
||||
*offset = mem1->offset;
|
||||
|
||||
if (offset) {
|
||||
GstMemoryDefault *parent;
|
||||
|
||||
parent = (GstMemoryDefault *) mem1->mem.parent;
|
||||
|
||||
*offset = mem1->offset - parent->offset;
|
||||
}
|
||||
|
||||
/* and memory is contiguous */
|
||||
return mem1->data + mem1->offset + mem1->size == mem2->data + mem2->offset;
|
||||
|
|
Loading…
Reference in a new issue