mirror of https://github.com/FFmpeg/FFmpeg.git
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>pull/336/head
parent
358b58cb29
commit
ccadd00a4a
12 changed files with 53 additions and 43 deletions
@ -1 +1 @@ |
||||
03d376cc2e8622e7af540d4d9809dbf7 |
||||
3dd15fa67a1df541aa89565ceb7047cf |
||||
|
@ -1,3 +1,3 @@ |
||||
be4903a6a6710043383c8f38a535a8d3 *tests/data/lavf-fate/lavf.av1.mkv |
||||
55636 tests/data/lavf-fate/lavf.av1.mkv |
||||
339f457b665fb5e8652fd50f2d3c4823 *tests/data/lavf-fate/lavf.av1.mkv |
||||
55650 tests/data/lavf-fate/lavf.av1.mkv |
||||
tests/data/lavf-fate/lavf.av1.mkv CRC=0x7c27cc15 |
||||
|
@ -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 |
||||
|
@ -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 |
||||
|
@ -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 |
||||
|
@ -1,48 +1,48 @@ |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 666 size: 208 |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 694 size: 208 |
||||
ret: 0 st:-1 flags:0 ts:-1.000000 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret: 0 st:-1 flags:1 ts: 1.894167 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret: 0 st: 0 flags:0 ts: 0.788000 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret: 0 st: 0 flags:1 ts:-0.317000 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret:-1 st: 1 flags:0 ts: 2.577000 |
||||
ret: 0 st: 1 flags:1 ts: 1.471000 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320139 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320167 size: 209 |
||||
ret: 0 st:-1 flags:0 ts: 0.365002 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146850 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146878 size: 27925 |
||||
ret: 0 st:-1 flags:1 ts:-0.740831 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret:-1 st: 0 flags:0 ts: 2.153000 |
||||
ret: 0 st: 0 flags:1 ts: 1.048000 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret: 0 st: 1 flags:0 ts:-0.058000 |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 666 size: 208 |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 694 size: 208 |
||||
ret: 0 st: 1 flags:1 ts: 2.836000 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320139 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320167 size: 209 |
||||
ret:-1 st:-1 flags:0 ts: 1.730004 |
||||
ret: 0 st:-1 flags:1 ts: 0.624171 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146850 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146878 size: 27925 |
||||
ret: 0 st: 0 flags:0 ts:-0.482000 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret: 0 st: 0 flags:1 ts: 2.413000 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret:-1 st: 1 flags:0 ts: 1.307000 |
||||
ret: 0 st: 1 flags:1 ts: 0.201000 |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 666 size: 208 |
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 694 size: 208 |
||||
ret: 0 st:-1 flags:0 ts:-0.904994 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret: 0 st:-1 flags:1 ts: 1.989173 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret: 0 st: 0 flags:0 ts: 0.883000 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292298 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292326 size: 27834 |
||||
ret: 0 st: 0 flags:1 ts:-0.222000 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
ret:-1 st: 1 flags:0 ts: 2.672000 |
||||
ret: 0 st: 1 flags:1 ts: 1.566000 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320139 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320167 size: 209 |
||||
ret: 0 st:-1 flags:0 ts: 0.460008 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146850 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146878 size: 27925 |
||||
ret: 0 st:-1 flags:1 ts:-0.645825 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 882 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 910 size: 27837 |
||||
|
Loading…
Reference in new issue