From 56491e6e9f01744f4c43abe7a7ddc1f5a5b179c3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 Sep 2014 14:24:56 +0100 Subject: [PATCH] [omxplayer] Only enable audio clock master when A/V sync method is set to audio clock --- xbmc/cores/omxplayer/OMXAudio.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/omxplayer/OMXAudio.cpp b/xbmc/cores/omxplayer/OMXAudio.cpp index 45a35bb34b49e..691b9a7678432 100644 --- a/xbmc/cores/omxplayer/OMXAudio.cpp +++ b/xbmc/cores/omxplayer/OMXAudio.cpp @@ -247,7 +247,8 @@ bool COMXAudio::PortSettingsChanged() { // By default audio_render is the clock master, and if output samples don't fit the timestamps, it will speed up/slow down the clock. // This tends to be better for maintaining audio sync and avoiding audio glitches, but can affect video/display sync - if(CSettings::Get().GetBool("videoplayer.usedisplayasclock") || CSettings::Get().GetString("audiooutput.audiodevice") == "PI:Both") + if((CSettings::Get().GetBool("videoplayer.usedisplayasclock") && CSettings::Get().GetInt("videoplayer.synctype") == SYNC_DISCON) || + CSettings::Get().GetString("audiooutput.audiodevice") == "PI:Both") { OMX_CONFIG_BOOLEANTYPE configBool; OMX_INIT_STRUCTURE(configBool); @@ -273,7 +274,7 @@ bool COMXAudio::PortSettingsChanged() { // By default audio_render is the clock master, and if output samples don't fit the timestamps, it will speed up/slow down the clock. // This tends to be better for maintaining audio sync and avoiding audio glitches, but can affect video/display sync - if(CSettings::Get().GetBool("videoplayer.usedisplayasclock")) + if(CSettings::Get().GetBool("videoplayer.usedisplayasclock") && CSettings::Get().GetInt("videoplayer.synctype") == SYNC_DISCON) { OMX_CONFIG_BOOLEANTYPE configBool; OMX_INIT_STRUCTURE(configBool);