{
GST_WARNING_OBJECT (buffer, "write map requested on non-writable buffer");
g_critical ("write map requested on non-writable buffer");
+ memset (info, 0, sizeof (GstMapInfo));
return FALSE;
}
no_memory:
{
/* empty buffer, we need to return NULL */
GST_DEBUG_OBJECT (buffer, "can't get buffer memory");
- info->memory = NULL;
- info->data = NULL;
- info->size = 0;
- info->maxsize = 0;
+ memset (info, 0, sizeof (GstMapInfo));
return TRUE;
}
cannot_map:
{
GST_DEBUG_OBJECT (buffer, "cannot map memory");
+ memset (info, 0, sizeof (GstMapInfo));
return FALSE;
}
}
lock_failed:
{
GST_CAT_DEBUG (GST_CAT_MEMORY, "mem %p: lock %d failed", mem, flags);
+ memset (info, 0, sizeof (GstMapInfo));
return FALSE;
}
error:
/* something went wrong, restore the orginal state again */
GST_CAT_ERROR (GST_CAT_MEMORY, "mem %p: subclass map failed", mem);
gst_memory_unlock (mem, (GstLockFlags) flags);
+ memset (info, 0, sizeof (GstMapInfo));
return FALSE;
}
}