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

Fix for deadlock when seek fails #25

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions Source/Drivers/OniFile/PlayerDevice.cpp
Expand Up @@ -556,12 +556,6 @@ void PlayerDevice::MainLoop()
// Seek the frame ID for first source (seek to (frame ID-1) so next read frame is frameId).
PlayerSource* pSource = m_seek.pStream->GetSource();
XnStatus xnrc = m_player.SeekToFrame(pSource->GetNodeName(), m_seek.frameId, XN_PLAYER_SEEK_SET);
if (xnrc != XN_STATUS_OK)
{
// Failure to seek.
m_isSeeking = FALSE;
continue;
}

// Return playback speed to normal.
m_dPlaybackSpeed = playbackSpeed;
Expand All @@ -573,11 +567,11 @@ void PlayerDevice::MainLoop()
// Reset the time reference.
m_bHasTimeReference = FALSE;

// Raise the seek complete event.
m_SeekCompleteInternalEvent.Set();

// Mark the seeking flag as false.
m_isSeeking = FALSE;

// Raise the seek complete event.
m_SeekCompleteInternalEvent.Set();
}
else
{
Expand Down