LibMedia: Stop overwriting top level element positions in Matroska
By not specifying HashSetExistingEntryBehavior::Keep, we were overwriting the first cluster's position with a later cluster in files that don't have a seek head element specifying the first cluster before the first cluster element in the file. This caused us to seek to the last cluster instead of the first one in some files.
This commit is contained in:
parent
7669cffabc
commit
9e2b674da5
1 changed files with 1 additions and 1 deletions
|
|
@ -298,7 +298,7 @@ DecoderErrorOr<Optional<size_t>> Reader::find_first_top_level_element_with_id([[
|
|||
|
||||
m_last_top_level_element_position = streamer.position();
|
||||
|
||||
DECODER_TRY_ALLOC(m_seek_entries.try_set(found_element_id, found_element_position));
|
||||
DECODER_TRY_ALLOC(m_seek_entries.try_set(found_element_id, found_element_position, AK::HashSetExistingEntryBehavior::Keep));
|
||||
|
||||
if (found_element_id == element_id) {
|
||||
position = found_element_position;
|
||||
|
|
|
|||
Loading…
Reference in a new issue