The currently queued frames must be flushed before either a progressive
key frame or before the first field of an interlaced key frame. The
first field may also be the bottom field even though that is rare.
The old revision has a serious memory usage issue. For example, on
Windows a 650 KB JSON file results in memory usage of roughly 2 GB of
allocated RAM that won't be freed anymore.
The updated version doesn't have this problem anymore.
Fixes#1631.
My JSON schema says it should be an integer, so make it one and not a
floating point number.
All other input modules already either use integers for storing the
value or cast the floating point variables to integers before adding
them to the JSON output.
This will only required required with an updated version of nlohmann's
JSON library as the current library implicitly casts the float to an
int. The updated version won't do that anymore and preserve the type.
The executable headers on Mac OS contain paths to shared libraries. When
building the disk image these absolute paths must be changed into ones
relative to the executable's location so that the end user doesn't have
to install those libraries (Qt in this case) system-wide.
Unfortunately there may not be enough room in the headers for this
substitution. The additional linker flag "-headerpad_max_install_names"
forces the linker to reserve enough space.
This is a regression introduced in
8ca1160de0 which was supposed to fix
--sub-charset having an effect on files with a byte-order
mark (BOM).
Problem is that the supposed fix also made the subtitle packetizer only
recode if a character set was explicitly given even for files which do
not contain a BOM. Instead it should recode from the system's character
set in such a case. This is done if charset_converter_c::init() is
called with an empty string. Unfortunately commit 8ca1160 changed the
packetizer not to call charset_converter_c::init() if the given
character set is empty.
Thee semantics are:
- "recode" is not set if the source is known to be in UTF-8 already,
e.g. if the track is read from an SRT file with a BOM or if it's read
from a Matroska file.
- "is_utf8" is set if the source is known to be in UTF-8 for other
reasons.
Therefore if recode is set and is_utf8 isn't then the conversion must
take place no matter if --sub-charset is given or not. If it is
given (m_ti.m_sub_charset is not empty) then use that;
otherwise (m__ti.m_sub_charset is empty) use the system's character
set.
Fixes#1639.