On Fri Mar 15 20:16:23 2024 +0000, Santino Mazza wrote:
I have a problem with this, if I generate a new topoid, and create_topology_with_id fails, the next_topology_id global variable will stay incremented causing tests to fail. Another solution might be to return a `struct topology` pointer instead of `IMFTopology` so the caller sets the topoid directly.
If you mean allocation failure, it's not a problem, because this could fail at any point after topology is created, and id will be incremented next time. Regarding obvious failure on null argument, simply move the check to MFCreateTopology(). Also I'd rename create_topology_with_id() to create_topology().