Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AESinkAUDIOTrack: Don't false alarm with m_offset #10714

Merged
merged 1 commit into from
Oct 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,16 @@ void CAESinkAUDIOTRACK::GetDelay(AEDelayStatus& status)
m_offset = m_headPos;
}

if (m_offset > m_headPos)
if (m_offset != -1 && (uint64_t) m_offset > m_headPos)
{
CLog::Log(LOGDEBUG, "You did it wrong man - fully wrong! offset %lld head pos %u", m_offset, head_pos);
CLog::Log(LOGDEBUG, "You did it wrong man - fully wrong! offset %lld head pos %llu", m_offset, m_headPos);
m_offset = 0;
}
uint64_t normHead_pos = m_headPos - m_offset;

// we might not yet be running here, but we need m_offset to track first PT fillup
uint64_t normHead_pos = m_headPos;
if (m_offset > 0)
m_headPos -= m_offset;

// this makes EAC3 working even when AML is not enabled
if (aml_present() && m_info.m_wantsIECPassthrough &&
Expand Down