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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user