summaryrefslogtreecommitdiff
path: root/tests/ref/lavf
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-12-29 10:20:42 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-04-13 08:43:14 +0200
commitccadd00a4a720979c6d4cedb52713c2585dd5b03 (patch)
treef979aea0664a60412fc10ed2dc7d665d5af0225d /tests/ref/lavf
parent358b58cb290defe706dd2f5bae96b29321059dfe (diff)
avformat/matroskaenc: Make output more deterministic
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'tests/ref/lavf')
-rw-r--r--tests/ref/lavf/mka4
-rw-r--r--tests/ref/lavf/mkv4
-rw-r--r--tests/ref/lavf/mkv_attachment4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/ref/lavf/mka b/tests/ref/lavf/mka
index f212097bac..b3c4117d92 100644
--- a/tests/ref/lavf/mka
+++ b/tests/ref/lavf/mka
@@ -1,3 +1,3 @@
-9bd06ae5291de75c19a60c3f39db4c09 *tests/data/lavf/lavf.mka
-43538 tests/data/lavf/lavf.mka
+0d48d93057f14704f6b839bb15e7328a *tests/data/lavf/lavf.mka
+43552 tests/data/lavf/lavf.mka
tests/data/lavf/lavf.mka CRC=0x3a1da17e
diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
index 04b554bb56..014ea06003 100644
--- a/tests/ref/lavf/mkv
+++ b/tests/ref/lavf/mkv
@@ -1,3 +1,3 @@
-85ef0666b3ad642221793b1c4f985011 *tests/data/lavf/lavf.mkv
-320418 tests/data/lavf/lavf.mkv
+06c38b55305367672a7fc4efb71947bc *tests/data/lavf/lavf.mkv
+320446 tests/data/lavf/lavf.mkv
tests/data/lavf/lavf.mkv CRC=0xec6c3c68
diff --git a/tests/ref/lavf/mkv_attachment b/tests/ref/lavf/mkv_attachment
index 08c9c1ebdb..f297d407c8 100644
--- a/tests/ref/lavf/mkv_attachment
+++ b/tests/ref/lavf/mkv_attachment
@@ -1,3 +1,3 @@
-6f68dccaaaf875a0671f47e5b21c8cca *tests/data/lavf/lavf.mkv_attachment
-472566 tests/data/lavf/lavf.mkv_attachment
+cf27537eabb1f4f222e7391aa4f5250d *tests/data/lavf/lavf.mkv_attachment
+472601 tests/data/lavf/lavf.mkv_attachment
tests/data/lavf/lavf.mkv_attachment CRC=0xec6c3c68