mirror of https://github.com/FFmpeg/FFmpeg.git
Writing the duration SimpleTag is special: It's size is reserved in advance via an EBML Void element (if seekable) and this reserved space is overwritten when writing the trailer; it does not use put_ebml_string(). The string to write is created via snprintf on a buffer of size 20; this buffer is then written via put_ebml_binary() with a size of 20. EBML strings need not be zero-terminated; if not, they are implicitly terminated by the element's length field. snprintf() always zero-terminates the buffer, i.e. the last byte can be discarded when using an EBML string. This patch does this. The FATE changes are as expected: One byte saved for every track; the only exception is the matroska-qt-mode test: An additional byte is saved because an additional byte could be saved from the enclosing Tags length field. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>pull/390/head
parent
59cb099478
commit
d53acf452f
34 changed files with 109 additions and 104 deletions
@ -1,3 +1,3 @@ |
||||
279268e8d6ffcc2299e725a756bbb1a0 *tests/data/lavf-fate/lavf.av1.mkv |
||||
55657 tests/data/lavf-fate/lavf.av1.mkv |
||||
ba198efa114b4db3c9f772728f84978b *tests/data/lavf-fate/lavf.av1.mkv |
||||
55656 tests/data/lavf-fate/lavf.av1.mkv |
||||
tests/data/lavf-fate/lavf.av1.mkv CRC=0x7c27cc15 |
||||
|
@ -1,3 +1,3 @@ |
||||
77db16a9fe1c42a230c85124bfb40cad *tests/data/lavf/lavf.mka |
||||
43573 tests/data/lavf/lavf.mka |
||||
4fede420f36a21bbb3ae4e5d6a884267 *tests/data/lavf/lavf.mka |
||||
43572 tests/data/lavf/lavf.mka |
||||
tests/data/lavf/lavf.mka CRC=0x3a1da17e |
||||
|
@ -1,3 +1,3 @@ |
||||
05889ab61cc6144018c80e50c781fe44 *tests/data/lavf/lavf.mkv |
||||
320428 tests/data/lavf/lavf.mkv |
||||
d5f719b715ad5eb6860c85f0d8202b8e *tests/data/lavf/lavf.mkv |
||||
320426 tests/data/lavf/lavf.mkv |
||||
tests/data/lavf/lavf.mkv CRC=0xec6c3c68 |
||||
|
@ -1,3 +1,3 @@ |
||||
901b4ba820fe1d6c627ce2a4b31b65af *tests/data/lavf/lavf.mkv_attachment |
||||
472578 tests/data/lavf/lavf.mkv_attachment |
||||
7681b6ece94f20684838bcbba2458c58 *tests/data/lavf/lavf.mkv_attachment |
||||
472576 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.011000 pts:-0.011000 pos: 676 size: 208 |
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 674 size: 208 |
||||
ret: 0 st:-1 flags:0 ts:-1.000000 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 size: 27837 |
||||
ret: 0 st:-1 flags:1 ts: 1.894167 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 size: 27834 |
||||
ret: 0 st: 0 flags:0 ts: 0.788000 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 size: 27834 |
||||
ret: 0 st: 0 flags:1 ts:-0.317000 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 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.982000 pts: 0.982000 pos: 320149 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320147 size: 209 |
||||
ret: 0 st:-1 flags:0 ts: 0.365002 |
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146860 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146858 size: 27925 |
||||
ret: 0 st:-1 flags:1 ts:-0.740831 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 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.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 size: 27834 |
||||
ret: 0 st: 1 flags:0 ts:-0.058000 |
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 676 size: 208 |
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 674 size: 208 |
||||
ret: 0 st: 1 flags:1 ts: 2.836000 |
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320149 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320147 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.480000 pts: 0.480000 pos: 146860 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146858 size: 27925 |
||||
ret: 0 st: 0 flags:0 ts:-0.482000 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 size: 27837 |
||||
ret: 0 st: 0 flags:1 ts: 2.413000 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 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.011000 pts:-0.011000 pos: 676 size: 208 |
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 674 size: 208 |
||||
ret: 0 st:-1 flags:0 ts:-0.904994 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 size: 27837 |
||||
ret: 0 st:-1 flags:1 ts: 1.989173 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 size: 27834 |
||||
ret: 0 st: 0 flags:0 ts: 0.883000 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292308 size: 27834 |
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292306 size: 27834 |
||||
ret: 0 st: 0 flags:1 ts:-0.222000 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 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.982000 pts: 0.982000 pos: 320149 size: 209 |
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320147 size: 209 |
||||
ret: 0 st:-1 flags:0 ts: 0.460008 |
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146860 size: 27925 |
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146858 size: 27925 |
||||
ret: 0 st:-1 flags:1 ts:-0.645825 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 892 size: 27837 |
||||
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 890 size: 27837 |
||||
|
Loading…
Reference in new issue