The function libvlc_media_get_tracks_info allocates memory for the returned tracks info that must be freed by the caller. I suggest/request the addition of a function such as:
Code: Select all
VLC_PUBLIC_API
int libvlc_media_free_tracks_info(libvlc_media_track_info_t *tracks );
The reason why I think this could be useful, aside from the possibility to change the way memory is allocated/freed inside libvlc without having to change client code, is the following. I've been using libvlc with an application compiled with Visual Studio (I know that __building VLC__ with Visual Studio is a complicated/not recommended thing, but using libvlc with it works great). When it comes the time to call free() on the allocated memory, Visual Studio's version of free() is called instead of mingw's, which crashes. In order to fix this, I had to create another DLL that I compiled with mingw with the very simple following code:
Code: Select all
#include <stdlib.h>
void mingw_free( void * p )
{
free( p );
}
That's why I request a function to free the memory allocated by the function:
Code: Select all
VLC_PUBLIC_API
int libvlc_media_free_tracks_info(libvlc_media_track_info_t *tracks );
Thanks,
pogo11