Skip to content

Commit

Permalink
VideoPlayer: increase threshold for assuming a stream as invalid for …
Browse files Browse the repository at this point in the history
…real-time streams
  • Loading branch information
FernetMenta authored and popcornmix committed Jan 8, 2016
1 parent 14f150e commit f9ed399
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xbmc/cores/VideoPlayer/VideoPlayer.cpp
Expand Up @@ -1946,10 +1946,14 @@ void CVideoPlayer::HandlePlaySpeed()
if ((m_CurrentVideo.syncState == IDVDStreamPlayer::SYNC_WAITSYNC) ||
(m_CurrentAudio.syncState == IDVDStreamPlayer::SYNC_WAITSYNC))
{
unsigned int threshold = 20;
if (m_pInputStream->IsRealtime())
threshold = 40;

bool video = m_CurrentVideo.id < 0 || (m_CurrentVideo.syncState == IDVDStreamPlayer::SYNC_WAITSYNC) ||
(m_CurrentVideo.packets == 0 && m_CurrentAudio.packets > 20);
(m_CurrentVideo.packets == 0 && m_CurrentAudio.packets > threshold);
bool audio = m_CurrentAudio.id < 0 || (m_CurrentAudio.syncState == IDVDStreamPlayer::SYNC_WAITSYNC) ||
(m_CurrentAudio.packets == 0 && m_CurrentVideo.packets > 20);
(m_CurrentAudio.packets == 0 && m_CurrentVideo.packets > threshold);

if (m_CurrentVideo.syncState == IDVDStreamPlayer::SYNC_INSYNC &&
m_CurrentAudio.syncState == IDVDStreamPlayer::SYNC_WAITSYNC)
Expand Down

0 comments on commit f9ed399

Please sign in to comment.