Normally the ESDS contains the decoder-specific configuration for AAC
tracks. If it doesn't, then a default configuration will now be
generated based on the track's header data (sample rate, channels).
Fixes#2221.
The code path for handling appending was only triggered if there was
exactly one entry between the parenthesis (e.g. `… + '(' VTS_02_1.VOB
')'`), but not with two and more.
Additional parts are usually only used for content from DVDs, and
appending content from DVDs is not an often-used function, it
seems. Therefore this bug didn't affect the vast majority of users.
For example: you add a file, disable the second audio track. Then you
append another file (again having two audio tracks). The second audio
track from the appended file will end up appended to the second audio
track from the first file by default — and as that is disabled, the
appended second audio track should be disabled too.
This is even clearer when considering that the GUI doesn't allow the
user to enable an appended track that's appended to a disabled track.
Unlike e.g. the track language, which only applies to the single
destination track, the subtitle character set is a property of the
source file/source container format. Therefore the user must be able
to set it for each source file/track, too. mkvmerge already follows
that model.
Fixes#2214.
On Windows libmagic uses the ANSI file functions for opening
files. Therefore passing file names with non-ASCII/non-ANSI characters
won't work a lot of the time. Therefore letting libmagic's look for
and use its default location algorithm is safer. As a result
`magic.mgc` must be stored in `share/misc` instead of `data`.
Fixes#2212.
If the first level 1 element after the resync is something
else (e.g. chapters, tags, cues etc.), then no element is returned,
and the result would be a segfault.
Fixes#2211.
Before this change the incomplete packet would be filled with data
from other PES packets from after the error location. This would lead
to invalid frame data.
So now both the currently incomplete PES packet as well as all
following TS packets that don't have the
`payload_unit_start_indicator` flag set will be dropped.
mkvmerge assumes an error is present either if the
`transport_error_indicator` flag is set in the transport stream packet
header, or if the `continuity_counter` header field's value doesn't
match the expected value based on the previous transport stream packet
for the same track.
Fixes#2181.
A transport stream packet doesn't have to contain a packetized
elementary stream packet. If a TS packet is treated as such and
doesn't actually contain a PES packet, then trying to extract
timestamps from it will only result in invalid timestamps.
Fixes#2193.
When an `mm_read_buffer_io_c` instance was created, it assumed the
underlying I/O object's stream position was 0. This doesn't have to be
the case, though. As the read buffer I/O class caches the file
position, too, this lead to it returning data from the wrong portion
of the underlying I/O object on subsequent reads.
One observable issue was that trying to detect the file type of MPLS
files that refer to short M2TS files failed with segmentation
faults.
The features removed are:
* mkvmerge: the options `--identify-verbose` (and its counterpart
`-I`), `--identify-for-gui`, `--identify-for-mmg` and
`--identification-format verbose-text`
* all command line tools: the old, proprietary format used for option
files
* all command line tools: support for passing command line options via the
environment variables `MKVTOOLNIX_OPTIONS`, `MKVEXTRACT_OPTIONS`,
`MKVINFO_OPTIONS`, `MKVMERGE_OPTIONS`, and `MKVPROPEDIT_OPTIONS`
Lacing works with a base timestamp for all frames in the
lace. Individual frame timestamps are calculated by adding the default
duration times the frame number (starting at 0) to the base timestamp.
This means that a gap in the timestamps cannot be expressed between
frames within the same lace. Therefore the first frame after each gap
must start its own lace.
Fixes#1700.
When mkvmerge is told to `--fix-bitstream-timing-information`, it will
now update all SPS NALUs, not just the ones in the AVCC.
Part of the fix for #1673.
The earlier algorithm tried to ensure that the values for
`num_units_in_tick` and `time_scale` fit into 32 bits. However, the
result was that the numbers were only approximation — e.g. 50 fields
per second were expressed as 5368709 / 268435456 instead of 1 / 50.