diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-07-05 09:29:18 -0400 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-07-05 09:50:09 -0400 |
commit | c13fa5cd20750bd04ecf10d8b47c77d87c921225 (patch) | |
tree | 997463a403856a36c6add538b285da933c0de3f9 | |
parent | f170bfbcbff6176cf7794df508ede71d160a8726 (diff) |
CDRipEncoder: Add FileSeek function for seeking (required by some libavformat muxers).
-rw-r--r-- | xbmc/cdrip/Encoder.cpp | 8 | ||||
-rw-r--r-- | xbmc/cdrip/Encoder.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/cdrip/Encoder.cpp b/xbmc/cdrip/Encoder.cpp index b401cec130..c51459aee1 100644 --- a/xbmc/cdrip/Encoder.cpp +++ b/xbmc/cdrip/Encoder.cpp @@ -89,6 +89,14 @@ int CEncoder::FileWrite(const void *pBuffer, uint32_t iBytes) return dwBytesWritten; } +int64_t CEncoder::FileSeek(int64_t iFilePosition, int iWhence) +{ + if (!m_file) + return -1; + FlushStream(); + return m_file->Seek(iFilePosition, iWhence); +} + // write the stream to our writebuffer, and write the buffer to disk if it's full int CEncoder::WriteStream(const void *pBuffer, uint32_t iBytes) { diff --git a/xbmc/cdrip/Encoder.h b/xbmc/cdrip/Encoder.h index 481524f96d..99c9093bdf 100644 --- a/xbmc/cdrip/Encoder.h +++ b/xbmc/cdrip/Encoder.h @@ -76,6 +76,7 @@ protected: bool FileCreate(const char* filename); bool FileClose(); int FileWrite(const void *pBuffer, uint32_t iBytes); + int64_t FileSeek(int64_t iFilePosition, int iWhence = SEEK_SET); int WriteStream(const void *pBuffer, uint32_t iBytes); int FlushStream(); |