- 19 May, 2020 1 commit
-
-
Andreas Rheinhardt authored
The Matroska muxer writes the Chapters early when chapters were already available when writing the header; in this case any tags pertaining to these chapters get written, too. Yet if no chapters had been supplied before writing the header, Chapters can also be written when writing the trailer if any are supplied. Tags belonging to these chapters were up until now completely ignored. This commit changes this: Writing the tags belonging to chapters has been moved to mkv_write_chapters(). If mkv_write_tags() has not been called yet (i.e. when chapters are written when writing the header), the AVIOContext for writing the ordinary Tags element is used, but not output, as this is left to mkv_write_tags() in order to only write one Tags element. Yet if mkv_write_tags() has already been called, mkv_write_chapters() will output a Tags element of its own which only contains the tags for chapters. When chapters are available initially, the corresponding tags will now be the first tags in the Tags element; but the ordering of tags in Tags is irrelevant anyway. This commit also makes chapter_id_offset local to mkv_write_chapters() as it is used only there and not reused at all. Potentially writing a second Tags element means that the maximum number of SeekHead entries had to be incremented. All the changes to FATE result from the ensuing increase in the amount of space reserved for the SeekHead (21 bytes more). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 18 May, 2020 1 commit
-
-
Andreas Rheinhardt authored
We won't be able to seek back to write the actual duration anyway. FATE-tests using the md5pipe command had to be updated due to this change. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 21 Apr, 2020 1 commit
-
-
Andreas Rheinhardt authored
Several EBML Master elements for which a good upper bound of the final length was available were nevertheless written without giving an upper bound of the final length to start_ebml_master(), so that their length fields were eight bytes long. This has been changed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 13 Apr, 2020 1 commit
-
-
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 02 Apr, 2020 1 commit
-
-
Andreas Rheinhardt authored
It might be used by the Matroska muxer. This is also the reason why the FATE-tests for muxing WavPack into Matroska needed to be updated: They now write the correct version 4.07 and not 4.03 as before. Reviewed-by: David Bryant <david@wavpack.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 26 Mar, 2020 1 commit
-
-
Andreas Rheinhardt authored
Up until e7ddafd5, the Matroska muxer wrote two SeekHeads: One at the beginning referencing the main level 1 elements (i.e. not the Clusters) and one at the end, referencing the Clusters. This second SeekHead was useless and has therefore been removed. Yet the SeekHead-related functions and structures are still geared towards this usecase: They are built around an allocated array of variable size that gets reallocated every time an element is added to it although the maximum number of Seek entries is a small compile-time constant, so that one should rather include the array in the SeekHead structure itself; and said structure should be contained in the MatroskaMuxContext instead of being allocated separately. The earlier code reserved space for a SeekHead with 10 entries, although we currently write at most 6. Reducing said number implied that every Matroska/Webm file will be 84 bytes smaller and required to adapt several FATE tests; furthermore, the reserved amount overestimated the amount needed for for the SeekHead's length field and how many bytes need to be reserved to write a EBML Void element, bringing the total reduction to 89 bytes. This also fixes a potential segfault: If !mkv->is_live and if the AVIOContext is initially unseekable when writing the header, the SeekHead is already written when writing the header and this used to free the SeekHead-related structures that have been allocated. But if the AVIOContext happens to be seekable when writing the trailer, it will be attempted to write the SeekHead again which will lead to segfaults because the corresponding structures have already been freed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
- 08 May, 2019 3 commits
-
-
Andreas Rheinhardt authored
Up until now, the length field of most level 1 elements has been written using eight bytes, although it is known in advance how much space the content of said elements will take up so that it would be possible to determine the minimal amount of bytes for the length field. This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-
Andreas Rheinhardt authored
Given that in both the seekable as well as the non-seekable mode dynamic buffers are used to write level 1 elements and that now no seeks are used in the seekable case any more, the two modes can be combined; as a consequence, the non-seekable mode automatically inherits the ability to write CRC-32 elements. There are no differences in case the output is seekable; when it is not and writing CRC-32 elements is disabled, there can still be minor differences because before this commit, the EBML ID and length field were counted towards the cluster size limit; now they no longer are. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-
Andreas Rheinhardt authored
Up until now the EBML Header length field has been written with eight bytes, although the EBML Header is always so small that only one byte is needed for it. This patch saves seven bytes for every Matroska/Webm file. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-
- 18 Jun, 2017 1 commit
-
-
Marton Balint authored
The md5 protocol has no seek support, but some tests use seeks. This changes the fate tests to actually create the output files and calculate the md5 on the written files, which also makes the tests independent of the size of the output buffers and output buffering in general. A new md5pipe fate test method is also introduced to keep the old functionality for tests where using a non-seekable output was intentional, and matroska md5 tests are changed to use that. Signed-off-by: Marton Balint <cus@passwd.hu>
-
- 06 Oct, 2016 1 commit
-
-
James Almer authored
Implements part of ticket #4347 Tested-by: Dave Rice <dave@dericed.com> Tested-by: Jerome Martinez <jerome@mediaarea.net> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
-
- 05 Oct, 2016 1 commit
-
-
James Almer authored
The durations are never written in that situation. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
-
- 02 Jul, 2016 1 commit
-
-
Anton Khirnov authored
This preserves all the information in the codec parameters. The wavpack ref changes are caused by the fact that now the sample format is set, so matroskaenc can use it to set the bit depth. Bug-Id: 945, along with the previous commit
-
- 03 Apr, 2016 1 commit
-
-
Luca Barbato authored
And bump the document version to 4.
-
- 05 Aug, 2015 1 commit
-
-
Sasi Inguva authored
Compute individual stream durations in matroska muxer. Write them as string tags in the same format as mkvmerge tool does. Signed-off-by: Sasi Inguva <isasi@google.com>
-
- 15 May, 2014 1 commit
-
-
Anton Khirnov authored
Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's codec context. Using codec options inside lavf is fragile and can easily break when the muxing codec context is not the encoding context.
-
- 18 Sep, 2013 1 commit
-
-
James Almer authored
Files won't validate with mkvalidtor if these two elements are missing. Use a const "Lavf" string that wont change with library version bumps. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
- 15 Sep, 2013 1 commit
-
-
James Almer authored
The muxer has been creating files with v4 elements for some time now, and especially now that we can mux non-experimental Opus files, reporting the DocTypeVersion as 2 is not correct. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
- 27 Aug, 2013 1 commit
-
-
John Stebbins authored
The element was only being written when the value == 1. But the default value of this element is 1, so this has no useful effect. This element needs to be written when the value == 0. Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
- 11 Jun, 2013 1 commit
-
-
Paul B Mahol authored
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-
- 28 May, 2013 2 commits
-
-
Anton Khirnov authored
-
Martin Storsjö authored
This allows having the samples accessible via different paths on the target and on the host. Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 12 Jan, 2013 1 commit
-
-
Diego Biurrun authored
-
- 28 Nov, 2012 1 commit
-
-
Diego Biurrun authored
-
- 23 Oct, 2012 1 commit
-
-
Diego Biurrun authored
-
- 19 May, 2012 1 commit
-
-
Mans Rullgard authored
This allows fate to run without errors with or without SAMPLES being set. Signed-off-by: Mans Rullgard <mans@mansr.com>
-
- 09 May, 2012 2 commits
-
-
Diego Biurrun authored
-
Mans Rullgard authored
This makes only tests actually using avconv depend on it. The remaining tests already depend on what they need. Signed-off-by: Mans Rullgard <mans@mansr.com>
-
- 13 Mar, 2012 1 commit
-
-
Paul B Mahol authored
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-
- 27 Feb, 2012 1 commit
-
-
Derek Buitenhuis authored
WavPack has a comprehensive test suite, and a bunch of corner cases. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-
- 25 Feb, 2012 1 commit
-
-
Derek Buitenhuis authored
WavPack has a comprehensive test suite, and a bunch of corner cases. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-