Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Rheinhardt b468ddc75d avformat/matroskaenc: Don't waste bytes to Write Tag length fields
This is possible by using a dynamic buffer to write them;
said dynamic buffer is (re)used and reset as appropriate.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-20 23:42:28 +02:00
Andreas Rheinhardt e8065c7def avformat/matroskaenc: Don't waste bytes on Video element length fields
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-19 11:50:27 +01:00
Andreas Rheinhardt 0148e85c3c avformat/matroskaenc: Don't waste bytes on SimpleTags length fields
Also check the (user-provided) tags for being overlong; the earlier
code had an implicit unchecked size_t->int conversion.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-19 11:34:36 +01:00
Andreas Rheinhardt 99a4d16658 avformat/matroskaenc: Add option to shift data to write cues at front
This is similar to the faststart option of the mov muxer, yet
in contrast to it it works together with reserve_index_space
(the equivalent to reserved_moov_size): If the reserved space
does not suffice, the data is shifted; if not, the Cues are
written at the front without shifting the data.
Several tests that cover (not only) this have been added.

Implements #7017.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-13 21:00:26 +01:00