Fix reading duration from MP4's track header atom

* Skip 4 bytes reserved space correctly
* See https://github.com/Martchus/tageditor/issues/98
This commit is contained in:
Martchus 2023-01-02 19:16:45 +01:00
parent 0347ca73eb
commit 3193df8e3f
1 changed files with 2 additions and 0 deletions

View File

@ -1588,12 +1588,14 @@ void Mp4Track::internalParseHeader(Diagnostics &diag, AbortableProgressFeedback
m_rawTkhdCreationTime = reader.readUInt32BE();
m_rawTkhdModificationTime = reader.readUInt32BE();
m_id = reader.readUInt32BE();
m_istream->seekg(4, std::ios_base::cur);
m_rawTkhdDuration = reader.readUInt32BE();
break;
case 1:
m_rawTkhdCreationTime = reader.readUInt64BE();
m_rawTkhdModificationTime = reader.readUInt64BE();
m_id = reader.readUInt32BE();
m_istream->seekg(4, std::ios_base::cur);
m_rawTkhdDuration = reader.readUInt64BE();
break;
default: