Hi!
I took the player (tutorial07.c), changed the main into: playVideoFile(char *filename); by simply exchanging argv to filename. Everything works, but when exiting the player function, the memory isn't freed.
In order to get audio to play the second time you want to play a movie within your program, you need to call SDL_CloseAudio(); in the SDL_QUIT event, like so:
        case SDL_QUIT:
            SDL_CloseAudio();
            is->quit = 1;
otherwise the audio won't play the 2nd time you start a video.
I'm trying to find what memory to free, but I'm new to thread programming (just started learning them by writing a web server in C for a Lab at the university), so I haven't found what to free yet.
When playing a video, it allocates the memory it needs, then stays there. And when closing down the
video, the memory is still allocated, in my case around 72Mb