Skip to content

Commit

Permalink
Merge pull request xbmc#8107 from pbhd/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins4kodi committed Oct 3, 2015
2 parents c5b1cba + c1e80ea commit 3b6a503
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbmc/filesystem/File.cpp
Expand Up @@ -1051,7 +1051,8 @@ CFileStreamBuffer::pos_type CFileStreamBuffer::seekoff(
std::ios_base::openmode mode)
{
// calculate relative offset
off_type pos = m_file->GetPosition() - (egptr() - gptr());
off_type aheadbytes = (egptr() - gptr());
off_type pos = m_file->GetPosition() - aheadbytes;
off_type offset2;
if(way == std::ios_base::cur)
offset2 = offset;
Expand Down Expand Up @@ -1080,7 +1081,7 @@ CFileStreamBuffer::pos_type CFileStreamBuffer::seekoff(

int64_t position = -1;
if(way == std::ios_base::cur)
position = m_file->Seek(offset, SEEK_CUR);
position = m_file->Seek(offset - aheadbytes, SEEK_CUR);
else if(way == std::ios_base::end)
position = m_file->Seek(offset, SEEK_END);
else
Expand Down
4 changes: 4 additions & 0 deletions xbmc/music/tags/TagLoaderTagLib.cpp
Expand Up @@ -218,7 +218,11 @@ bool CTagLoaderTagLib::Load(const std::string& strFileName, CMusicInfoTag& tag,
else if (aiffFile)
id3v2 = aiffFile->tag();
else if (wavFile)
#if TAGLIB_MAJOR_VERSION > 1 || TAGLIB_MINOR_VERSION > 8
id3v2 = wavFile->ID3v2Tag();
#else
id3v2 = wavFile->tag();
#endif
else if (wvFile)
ape = wvFile->APETag(false);
else if (mpcFile)
Expand Down

0 comments on commit 3b6a503

Please sign in to comment.