Skip to content
Snippets Groups Projects
Romain Vimont's avatar
Romain Vimont authored
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.
8a9d595a