Commit Graph

446 Commits

Author SHA1 Message Date
Moritz Bunkus
74da9dd6db
GUI: mux: implement dragMoveEvent for Tool
Due to a bug in Qt 5.12 on macOS, drag & drop only works if the
`dragMoveEvent` is implemented, too. See this discussion[1] on the Qt
forum and the corresponding bug report[2].

Implements a workaround for #2472.

[1]  https://forum.qt.io/topic/97649/bug-in-qt-5-12-drag-n-drop/56
[2]  https://bugreports.qt.io/browse/QTBUG-72844
2019-01-05 14:51:03 +01:00
Moritz Bunkus
54854c20ec
bump version number, set release codename 2019-01-04 13:35:06 +01:00
Moritz Bunkus
dde29920ab
NEWS.md: reorder & reword for easier consumption 2019-01-04 13:10:29 +01:00
Moritz Bunkus
6c79fb7a5a
GUI: chapters: implement "copy to other tab"
Part of the implementation of #2439.
2019-01-03 19:03:53 +01:00
Moritz Bunkus
db8fec6358
GUI: chapters: implement appending from existing file to current tab
Part of the implementation of #2439.
2019-01-03 19:03:53 +01:00
Moritz Bunkus
a0692c2743
NEWS: add entry for flush change
See #2469.
2019-01-01 18:14:24 +01:00
Moritz Bunkus
fd71901aa4
GUI: mux: implement button for switching between recent output directories
Implements #2468.
2018-12-30 20:47:44 +01:00
Moritz Bunkus
0aee0cc2a6
GUI: prefs: remember 10 recently used "fixed/relative output directories"
Inspired by the feature requested in #2468.
2018-12-30 18:27:13 +01:00
Moritz Bunkus
79ec2a0ccb
AAC: AudioSpecificConfig contains channel_configuration, not number of channels
A `channel_configuration` of 7 actually means 8 channels (7.1).
2018-12-21 17:59:56 +01:00
Moritz Bunkus
ba55984c2c
GUI: mux: don't access m_appendedTo for additional parts
`SourceFile::m_appendedTo` is only set if the file is really an appended
file, but not if it's an additional parts.

Fixes #2461.
2018-12-19 20:20:31 +01:00
Moritz Bunkus
4e7fe6c790
extract: WAV: convert to W64 if extension is .w64 or file size is > 4 GB
Implements #2458.
2018-12-19 18:34:30 +01:00
Moritz Bunkus
8383780e4a
fix compilation with Boost 1.69.0
In 1.69.0 the `boost::tribool` class's `operator bool` was made
explicit. This means that using a `boost::tribool` as the return value
in a function returning a `bool` requires an explicit cast.

Fixes #2460.
2018-12-15 19:20:49 +01:00
Moritz Bunkus
569b34d0a2
GUI: mux: allow customization of predefined split sizes 2018-12-11 19:48:44 +01:00
Moritz Bunkus
1677217003
bump version number, set release codename 2018-12-01 12:14:39 +01:00
Moritz Bunkus
efa64cb7e8
NEWS.md: reorder for easier consumption 2018-12-01 12:07:49 +01:00
Moritz Bunkus
383b910fe2
mkvmerge, GUI's chapter editor: use name template for nameless Ogg chapters
Fixes #2441.
2018-11-25 22:27:33 +01:00
Moritz Bunkus
4b87f049e7
kax_analyzer_c: adjust cues when a cluster was moved
Writing level 1 elements can lead to the situation that a one-byte gap
must be covered. In that case `kax_analyzer_c` can move the head of
the following element by shrinking or enlarging its size field.

If that following element happens to be a cluster, there may be cues
that refer to that cluster. They must be updated in order to reflect
the cluster's new position.

Fixes #2408.
2018-11-24 15:04:24 +01:00
Moritz Bunkus
0683d30a19
mkvextract: AAC: write program config element if present in AudioSpecificConfig
The `CodecPrivate` Matroska element contains AAC's
`AudioSpecificConfig` structure. That structure can contain a
`GASpecificConfig` structure which in turn can contain a
`program_config_element` (short: PCE).

The PCE carries vital information about number of
channels in certain situations and must be present in the first raw
AAC packet if it is present in the `AudioSpecificConfig`. Otherwise
the number of channels cannot be determined.

mkvextract will now check whether the first packet contains the PCE
already. If it doesn't and if there's a PCE in the
`AudioSpecificConfig`, mkvextract will now prepend the first audio
packet with that PCE (right behind the ADTS headers).

Fixes #2205 and #2433.
2018-11-21 17:05:48 +01:00
Moritz Bunkus
629234e9e9
fmt conversion: add to NEWS.md 2018-11-20 21:30:27 +01:00
Moritz Bunkus
29cdba5f29
chapters: take smallest timestamp in first file into account
When generating chapters mkvmerge has to take into account things such
as splitting and file linking. This requires shifting chapter
timestamps to match file timestamps. However, for files which don't
start at 0 generated chapters would be wrongfully shifted down to
below 0 causing invalid timestamps.

Fixes #2432.
2018-11-16 09:54:52 +01:00
Moritz Bunkus
88ef93984f
MP4 reader: don't read atom data beyond parent atom's size
Fixes #2431.
2018-11-15 20:03:07 +01:00
Moritz Bunkus
e8342d4d92
GUI: inhibit sleep while the job queue is running on macOS
Part of the implementation of #2411.
2018-11-04 21:06:20 +01:00
Moritz Bunkus
2250476c3a
GUI: inhibit sleep while the job queue is running on Windows
Part of the implementation of #2411.
2018-11-04 18:58:06 +01:00
Moritz Bunkus
1ebbb284bd
GUI: inhibit sleep via logind while the job queue is running
This method works for systems where a logind-compatible D-Bus
interface is available for inhibiting sleep & idle states. Requires
Qt's D-Bus library.

Part of the implementation of #2411.
2018-11-04 18:58:06 +01:00
Moritz Bunkus
1200f0db95
GUI: add option for disabling automatic high DPI scaling
Should be a workaround for those affected by #2415.
2018-10-29 21:44:32 +01:00
Moritz Bunkus
afecdcc212
Windows apps: include application manifest properly
The resource compiler includes identifiers that aren't defined as
preprocessor symbols verbatim as strings. Normally `RT_MANIFEST` is
defined as the integer resource 24, but if the header file where it is
defined (`winuser.h`) isn't included, the verbatim string
`RT_MANIFEST` will be used silently.

See #2415.
2018-10-28 12:16:58 +01:00
Moritz Bunkus
fc0946db0a
bump version number, set release codename 2018-10-25 22:22:31 +02:00
Moritz Bunkus
43021d16c7
kax_file_c, ElementReader: only delete returned upper-level element if found
The `EbmlElement::Read` function returns two values via reference
parameters. They're called `UpperEltFound` (an integer) and
`FoundElt` (a pointer to an EBML element). They're used for passing
back the first element found (if any) that is not a child of the
element currently being read so that the calling code can continue
parsing the file using the upper-level element.

If the calling code doesn't need that element, it has to delete it
itself. However, the code must not simply rely on the `FoundElt`
pointer being not null as the `Read` function assigns temporary
results to that variable. Depending on the file content, that
temporary element may have already been deleted by the `Read`
function. When the calling code then simply deletes `FoundElt` itself,
this leads to a typical case of use-after-free.

Instead the calling code must only work with the returned `FoundElt`
pointer if the other returned value, `UpperEltFound`, trueish in the
C++ sense (if it isn't 0). Then and only then may the calling code
attempt to delete the object `FoundElt` points to.

This vulnerability allows arbitrary code execution via specially
crafted Matroska files. It was reported by Cisco TALOS on 2018-10-25
and is known as TALOS 2018-0694.
2018-10-25 22:22:31 +02:00
Moritz Bunkus
c1bea9233f
bump version number, set release code name 2018-10-23 20:46:33 +02:00
Moritz Bunkus
4fc369a28d
news: update 2018-10-23 20:45:12 +02:00
Moritz Bunkus
e330bc6d09
GUI: info: don't abort on void elements after clusters
The info tool uses a loop scanning level 1 elements starting with the
first cluster in order to provide a response UI to the user. That loop
is exited when the end of the file is reached or a higher-level
element (level 0) is encountered.

The `EbmlStream::FindNextElement` function used for retrieving the
next element sets the `upper_lvl_el` parameter to a non-zero value
when it finds global elements such as an EBML Void element. However, a
scan of level 1 elements should not abort on an EBML Void
element (generally on any type of global elements) but only when a
real level 0 element is found.

Fixes #2413.
2018-10-23 16:04:12 +02:00
Moritz Bunkus
1a3adffb4c
Matroska reader: AV1: recreate av1C when reading files by mkvmerge v28.0.0
Last part of the fix for #2410.
2018-10-21 22:51:02 +02:00
Moritz Bunkus
a346aadfae
AV1 parser: include OBU common data in av1C
Part of the fix of #2410.
2018-10-21 22:29:43 +02:00
Moritz Bunkus
1a6286e778
AV1 parser: fix bug in sequence header parser
The two header fields `delta_frame_id_length_minus2` and
`additional_frame_id_length_minus1` are only present if
`reduced_still_picture_header` is not set but
`frame_id_numbers_present_flag` is.

Part of the fix for #2410.
2018-10-21 22:14:16 +02:00
Moritz Bunkus
4af926cc20
bump version number, set release codename 2018-10-20 16:29:36 +02:00
Moritz Bunkus
5ff777de16
news: reorder for easier consumption 2018-10-20 16:28:25 +02:00
Moritz Bunkus
fe5e19753f
kax_analyzer_c: fix one-byte gap handling
When surrounding elements have been written using eight-byte size
length fields, the analyzer cannot enlarge the element
anymore. Instead, it can shrink them by one byte and move the head
up. That way the former one-byte gap will become a two-byte gap
instead. A new, empty EBML void element can then be placed in the gap
instead.

libavformat from ffmpeg/libav writes most level 1 elements with
eight-byte size length fields. Files created by it are therefore the
prime candidate for hitting this but.

Fixes #2406.
2018-10-20 16:21:35 +02:00
Moritz Bunkus
2f5b9149a0
VP9 packetizer: build codec private according to VP9 codec mapping
Implements #2379.
2018-10-13 18:48:33 +02:00
Moritz Bunkus
a80c3bd09e
extract: IVF: use precise frame rates if possible
Part of #2261.
2018-10-11 14:33:57 +02:00
Moritz Bunkus
2fd9328e99
extract: IVF: fix scaling frame rate scaling to 16 bit
Part of #2261.
2018-10-11 14:33:50 +02:00
Moritz Bunkus
4d207671ba
GUI: header editor: use predefined track names on track name page
Second part of the implementation of #2230.
2018-10-09 20:49:48 +02:00
Moritz Bunkus
8627734525
GUI: mux: let user predefine track names to select from
Part of the implementation of #2230.
2018-10-09 20:49:47 +02:00
Moritz Bunkus
788d5debb0
NEWS: remove duplicate word 2018-10-09 12:35:42 +02:00
Moritz Bunkus
8a242267be
NEWS: update for latest AV1 changes 2018-10-07 23:06:48 +02:00
Moritz Bunkus
1eb0253b6b
teletext-to-SRT: flush queued frame sooner if future merge is impossible
So far the "erase" flag wasn't used at all when determining whether or
not to flush the currently queued frame. It can be used, though, as
it's clear that erasing means the following content cannot be merged
to the current one.

Flushing earlier also means that fewer data will have to be buffered
before the frame is handed over to the output routines which will then
interleave frames from different tracks.

This also reverts the increase in maximum buffered amount of data in
the MPEG transport stream reader; it's back to 20 MB now.

Fixes #2393.
2018-10-07 14:43:37 +02:00
Moritz Bunkus
13821a724f
JSON identification: catch "out of space" exception in bad UTF-8 removal
This is the only exception that `::utf8::remove_invalid()` throws. If
it is encountered, simply stop processing the string further.

Fixes #2398.
2018-10-06 12:29:32 +02:00
Moritz Bunkus
b242ed2fa1
MPEG TS: allow 50 MB to be buffered
With a low buffer limit, it's possible that mkvmerge hits the limit
while looking for the "end of display" conditions for teletext
subtitles. In such a case mkvmerge starts writing out buffered audio &
video packets even though there's no packet available for the subtitle
track.

Once mkvmerge does find the "end of display" conditions, the formerly
incomplete subtitle packet will be written. However, at that point the
timestamps of audio & video packets are higher already, causing the
subtitle packet to be interlaved wrongly.

The higher the limit, the less likely it is mkvmerge will run into
such a situation. With 50 MB the problem disappears for the provided
test file.

Workaround for #2393.
2018-10-05 21:29:34 +02:00
Moritz Bunkus
b7b3721a42
mkvmerge: simple text subtitles: handle blocks without a duration
If there's no duration, the current entry will be buffered. As soon as
the following entry is found, the difference between the start
timestamps of the current and buffered blocks will be used as the
buffered block's duration.

Second part of the implementation of #2397.
2018-10-05 20:26:10 +02:00
Moritz Bunkus
237585d0d4
mkvextract: simple text subtitles: handle blocks without a duration
If there's no duration, the current entry will be buffered. As soon as
the following entry is found, the difference between the start
timestamps of the current and buffered blocks will be used as the
buffered block's duration.

Part of the implementation of #2397.
2018-10-05 19:06:51 +02:00
Moritz Bunkus
0eb828ef24
DTS: dialog normalization gain removal for extension substreams
Implements #2377.
2018-10-02 13:14:38 +02:00