On my macOS installation `pkg-config --libs flac` doesn't include Ogg,
and the linker won't search for the library automatically. This means
that FLAC detection fails due to unresolved, Ogg-related symbols.
Fixes#3439.
The job output is stored in two places: the UI elements visible to the
user, and an internal string array. The latter is used when saving the
output as it reflects the order in which lines arrived in,
intermingling regular output lines & warnings/errors properly.
The "clear output" functionality only cleared the UI elements, but not
the internal string array. This meant that any "save output" action
run after a "clear output" action would write all lines received
during the current run of MKVToolNix GUI.
Now "clear output" also clears the internal string array.
Fixes#3438.
The OBU header is at least one byte long, and mkvmerge only really
supports headers with a size field present, making it at least two
bytes long. However, the size field is encoded with a variable-width
encoding (leb128), making it impossible to determine if there's enough
data to parse the header without parsing the header.
If there's not enough data, a "end of data" exception is thrown by the
bit reader. Unfortunately that exception hadn't been caught in the AV1
parser, causing it to restart the next parse in the middle of an OBU,
effectively halting all AV1 parsing at that point.
This fix will remember the last known-good parser position before
trying to parse the OBU header. If that fails with an "end of data"
exception, the position will be reset to the last known-good position,
and parsing will resume from there once more data has been added.
Fixes#3431.
Newer libFLAC in MXE require a preprocessor definition of
`FLAC__NO_DLL` to signal that libFLAC wasn't built as a DLL. Otherwise
the linker will look for the wrong symbol names.
This lays the foundation for showing desktop notifications in the
preferences via the "run programs after…" mechanism. It also adds an
implementation for Linux/Unix systems via Qt & D-Bus.
Often the programs have to relocate the Master elements in which the
modifications were done. In that case the Seek Head elements must also
be updated to reflect to the Master elements' new positions.
The analyzer tries to re-use existing Seek Head elements at the start
of the file. If it is too small, it'll be relocated to the end of the
file & a new compact Seek Head will be created at the front
referencing the relocated one at the back. The newly created Seek Head
will be placed in the position of the relocated Seek Head.
Unfortunately it's possible that the space vacated by the relocated
Seek Head is so small that a newly created Seek Head doesn't fit into
it. In that case the analyzer would end up in an endless loop, trying
to write data to the end of the file until the drive's full or the
program's killed.
The solution is not to use that space (by overwriting it with an EBML
Void element) & trying to find a different place at the start. This
can be an existing EBML Void element big enough for it, or by
relocating another level 1 element (such as Info, Tracks, Chapters
etc.) & using the space freed up by that relocation.
Fixes#3338.