Skip to content
Snippets Groups Projects
Commit 8a9d595a authored by Romain Vimont's avatar Romain Vimont Committed by Hugo Beauzée-Luyssen
Browse files

mtp: store items in vlc_vector

Allocating the pp_items array required to know the number of items in
advance.

To do so, the mtp module hijacked the progression callback to know the
number of items on listing (which was called once for each item, but in
the end the total value was correct).

This callback function accepts a "userdata" having type `void const *`,
so it not intended to write to it, but it still worked without ugly cast
due to an additional redirection (p_sys).

To prepare further refactors (multi-device support), remove this
callback hack and use a vlc_vector to append items on-the-fly.
parent e5e20a5e
No related branches found
No related tags found
1 merge request!945services discovery: mtp: rework implementation
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment