start and quickly stop rtmp stream causes assert at media_player.c: 348
IOS 13.5
Swift 5
mobileVLCKit commit f6ed0887 (3.3.13)
Happens every time.
If you call mediaPlayer.play() and then call mediaPlayer.stop() before the stream displays will cause an assert because program is NULL. void* data is pointing to a valid libvlc_media_player_t as mp->player->media->psz_name contains my rtmp stream. This happens every time. It takes about 14 seconds from hitting play before the stream starts.
attached is a screen shot of the values of player and the stack trace of the thread.
static void on_program_selection_changed(vlc_player_t *player, int unselected_id,
int selected_id, void *data)
{
(void) unselected_id;
libvlc_media_player_t *mp = data;
if (selected_id == -1)
return;
const struct vlc_player_program *program =
vlc_player_GetSelectedProgram(player);
assert(program); <---- program==NULL
libvlc_event_t event;
event.type = libvlc_MediaPlayerScrambledChanged;
event.u.media_player_scrambled_changed.new_scrambled = program->scrambled;
libvlc_event_send(&mp->event_manager, &event);
}