Merge pull request #334 from cgmartin/fix/vlc-audio-loop

Fix: VLC player not muting audio after first loop
This commit is contained in:
Jools Wills 2017-12-23 20:48:20 +00:00 committed by GitHub
commit b8dd51ddf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -264,6 +264,10 @@ void VideoVlcComponent::handleLooping()
libvlc_state_t state = libvlc_media_player_get_state(mMediaPlayer); libvlc_state_t state = libvlc_media_player_get_state(mMediaPlayer);
if (state == libvlc_Ended) if (state == libvlc_Ended)
{ {
if (!Settings::getInstance()->getBool("VideoAudio"))
{
libvlc_audio_set_mute(mMediaPlayer, 1);
}
//libvlc_media_player_set_position(mMediaPlayer, 0.0f); //libvlc_media_player_set_position(mMediaPlayer, 0.0f);
libvlc_media_player_set_media(mMediaPlayer, mMedia); libvlc_media_player_set_media(mMediaPlayer, mMedia);
libvlc_media_player_play(mMediaPlayer); libvlc_media_player_play(mMediaPlayer);