nlohmann's JSON libraries in version 2.x used to strip bytes that
aren't valid UTF-8 from strings (e.g. service/station names in MPEG
transport streams) before outputting the JSON data structures. With
MKVToolNix v24 that bundled library was updated to v3 which now throws
an exception on such invalid data.
Therefore mkvmerge now takes care of replacing invalid bytes with
placeholder characters itself before passing the strings to nlohmann's
JSON library.
Fixes#2327.
It is dangerous insofar as it pollutes an immense number of source
files. For example, utf8cpp's stuff uses relative namespace
names (e.g. `utf8::some_type`). If `using namespace libebml` is in
effect, then this clashes with `libebml::utf8` which is a typedef for
`unsigned char`, causing compiler errors.
One side affect of the fixed bug was that trying to identify/mux an
empty file (file with a size of 0) resulted in the following error
message:
> Error: buffer_c: num > m_filled. Should not have happened. Please
> file a bug report.
After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.
This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.
This is the HEVC analog for what was fixed for AVC in #2325.
After reading the headers, the file is read again from the
start. Therefore no data must be left in the parser's internal
buffers. That was the intention behind calling `flush()` - but that
isn't actually what flush does. Instead it tries to use the remaining
data in the buffers as a frame.
This is not only wrong, it can also fail and cause an exception to be
thrown. That in turn causes a failure when reading the headers — both
identification and muxing abort at that point.
Fixes#2325.
Whenever the word means all the possible elements in the "tracks,
chapters and tags" box, the word "item" is better as it includes
chapters & tags whereas "tracks" only means "audio/video/subtitle/
button tracks".
In AC-3 streams you can have an AC-3 core with dependent E-AC-3
frames. The E-AC-3 frames can both replace channels from the AC-3 core
and add additional channels to them.
Fixes#2283.
The packetizers should not call `set_video_display_width/height`
directly as that doesn't take parameter precedence into account:
command line parameters should override bitstream parameters.
libintl.h defines a preprocessor define for `snprintf` with the
content of `libintl_snprintf` if the C library isn't GNU's
glibc. Therefore `std::snprintf` actually becomes
`std::libintl_snprintf` which doesn't exist. This affects e.g. mingw
and macOS.
With g++ 8 there are way too many false positives in `EbmlElement.h`
which is included from nearly each and every file in MKVToolNix. This
floods the compilation logs with irrelevant warnings drowning out the
legitimate ones.