• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Make output more deterministic · ccadd00a
    Andreas Rheinhardt authored
    Using random values for TrackUID and FileUID (as happens when the
    AVFMT_FLAG_BITEXACT flag is not set) has the obvious downside of making
    the output indeterministic. This commit mitigates this by writing the
    potentially random values with a fixed size of eight byte, even if their
    actual values would fit into less than eight bytes. This ensures that
    even in non-bitexact mode, the differences between two files generated
    with the same settings are restricted to a few bytes in the header.
    (Namely the SegmentUID, the TrackUIDs (in Tracks as well as when
    referencing them via TagTrackUID), the FileUIDs (in Attachments as
    well as in TagAttachmentUID) as well as the CRC-32 checksums of the
    Info, Tracks, Attachments and Tags level-1-elements.) Without this
    patch, there might be an offset/a size difference between two such
    files.
    
    The FATE-tests had to be updated because the fixed-sized UIDs are also
    used in bitexact mode.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    ccadd00a
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...