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
Loading
Please register or sign in to comment