lib: media_player: fix libvlc_MediaPlayerMediaChanged event
- Don't override the media set by the user from
on_current_media_changed().
- Don't create a new media from an input_item. This will prevent to send
media events with a media pointer that is unknown to the caller.
This callback is now always sending a media that is set with
libvlc_media_player_set_media().
Since the player is now fully asynchronous, a call to set_media() +
play() will be processed asynchronously if an older media is playing.
The user might want to know when its new media is actually playing.
Listening to the libvlc_MediaPlayerMediaChanged event is only way to do so.
Here is an example:
1. set_media(A) && play()
-> get_media() -> A
2. set_media(B) && play()
-> get_media() -> B
3. libvlc_MediaPlayerMediaChanged(A)
-> get_media() -> B
4. libvlc_MediaPlayerMediaChanged(B)
-> get_media() -> B