mkvparser: minor SeekHead::Entry clean up.

- Store actual element ID in SeekHead::Entry id field (instead
  of a decoded EBML int, which is completely _wrong_).
- Add a SeekHead::Entry constructor so we get initialized values
  in SeekHead::Entry's when parsing an Entry fails.

Change-Id: I152fae54628cb84918917139dba0cd0b42a44a57
This commit is contained in:
Tom Finegan
2016-08-29 13:52:23 -07:00
parent 24fb44aa1a
commit 826436a42f
3 changed files with 6 additions and 16 deletions

View File

@@ -73,10 +73,7 @@ bool HasCuePoints(const mkvparser::Segment* segment,
std::int64_t offset = 0;
for (int i = 0; i < seek_head->GetCount(); ++i) {
const SeekHead::Entry* const entry = seek_head->GetEntry(i);
// TODO(tomfinegan): Cues ID is really 0x1C53BB6B, aka kMkvCues, but
// mkvparser reads IDs as EBML unsigned ints in some cases, yielding magic
// numbers like the following. Investigate fixing this behavior.
if (entry->id == 0xC53BB6B) { // Cues ID as stored in Entry class.
if (entry->id == libwebm::kMkvCues) {
offset = entry->pos;
}
}