Skip to content

Commit

Permalink
[omxplayer] Only enable audio clock master when A/V sync method is se…
Browse files Browse the repository at this point in the history
…t to audio clock
  • Loading branch information
popcornmix committed Apr 14, 2015
1 parent b3ccf2f commit e097d8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbmc/cores/omxplayer/OMXAudio.cpp
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit e097d8d

Please sign in to comment.