There might be new elements that libmatroska doesn't know about.
It's better to assume they are new elements rather than bogus data.
This is how we read elements in general to be forward compatible.
FindNextID() is supposed to return an element of the given type when it's found. But in some cases,
when the ID and sizes are plausible, an EbmlDummy is returned [1].
We should not use that element as if it was a legit element we're looking for.
This is especially crucial when we're opening a file to decide if it's an EBML file or not (EbmlHead).
[1] 1c4e2f31b8/src/EbmlElement.cpp (L185)
Unless it's an EbmlDummy the element is not unknown if it has a known class.
Rather than displaying a decorated C++ class name, show the actual element name in libmatroska.
No need for Runtime Type Indentification (RTTI) for that.
The EBML_NAME() has been around since at least libebml 0.8: cd378f23ff
By default the index contains cluster positions with an unknown timestamp. In
some cases this unknown timestamp may end up being the only one we know (yet)
for some tracks. It's not a valid timestamp and should not overwrite valid
"last DTS" we found on other tracks when finding the PCR.
In the end we always end up never sending the PCR which ends up not starting
playback, which ends up not feeding more DTS, which ends up never getting any
PCR.
Compilation would fail with:
> error: 'numeric_limits' is not a member of 'std'
without this include because of some hardening build
flags mandated on Fedora Linux, with GCC 11.
Fix#25325
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
It can only be loaded with the proper name, it is not automatically loaded.
It is necessary to know when opening the module because we start parsing the
Matroska data to find the mandatory headers and the Cues may be parsed during
that time.
In order to respect ODR, in C++ code, declare *_sys_t types in a
separate namespace, either unnamed if it's used only in one translation
unit, or named otherwise.
The GUI modules qt and skins2 are left unchanged for now.
See #17078 and #18033
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
When several tracks of the same kind were flagged "forced", it selected
the last one. Instead, select the default one if any.
Fixes#18883
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>