Skip to content
Browse files

Changed the myth file seek behaviour so it doesn't pass the SEEK_POSS…

…IBLE whence parameter through to libcmyth as it doesn't understand it. Return seek possible for recordings but not for Live TV.
  • Loading branch information...
1 parent d1d265e commit 65221447a3981b157c5e12ded737e3aed8fce89c David Teirney committed Aug 8, 2011
Showing with 10 additions and 8 deletions.
  1. +10 −8 xbmc/filesystem/MythFile.cpp
View
18 xbmc/filesystem/MythFile.cpp
@@ -466,15 +466,17 @@ int64_t CMythFile::Seek(int64_t pos, int whence)
{
CLog::Log(LOGDEBUG, "%s - seek to pos %"PRId64", whence %d", __FUNCTION__, pos, whence);
- int64_t result;
- if(m_recorder)
- result = -1; //m_dll->livetv_seek(m_recorder, pos, whence);
- else if(m_file)
- result = m_dll->file_seek(m_file, pos, whence);
- else
- result = -1;
+ if(m_recorder) // Live TV
+ return -1; // Seeking not possible. Eventually will use m_dll->livetv_seek(m_recorder, pos, whence);
- return result;
+ if(m_file) // Recording
+ {
+ if (whence == 16) // SEEK_POSSIBLE = 0x10 = 16
+ return 1;
+ else
+ return m_dll->file_seek(m_file, pos, whence);
+ }
+ return -1;
}
int64_t CMythFile::GetPosition()

0 comments on commit 6522144

Please sign in to comment.
Something went wrong with that request. Please try again.