diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-12-30 15:59:02 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-03-30 06:26:34 +0200 |
commit | d9c21ec63999501afc39ffc26f363245e8624304 (patch) | |
tree | 641b4a4657defe76bf1441a0aeaac318538f33b9 /libavformat/rtmp.h | |
parent | 5e3b7bd56d2c476a508c03e2029675bfd2618122 (diff) | |
download | ffmpeg-d9c21ec63999501afc39ffc26f363245e8624304.tar.gz |
avformat/matroskaenc: Write level 1 elements in one go
Up until now, writing level 1 elements proceeded as follows: First, the
element id was written to the ordinary output AVIOContext and a dynamic
buffer was opened for the content of the level 1 element in
start_ebml_master_crc32(). Then this buffer was actually used and after it
was closed (in end_ebml_master_crc32()), the size field corresponding to
the buffer's size was written, after which the actual data was written.
This commit changes this: Nothing is written to the main AVIOContext any
more in start_ebml_master_crc32(). end_ebml_master_crc32() now writes
both the id, the length field as well as the data. This implies that
one can start a level 1 element in memory without outputting anything.
This is done to enable to test whether enough space has been reserved
for the Cues (if space has been reserved for them) before writing them.
A large duration between outputting the header and outputting the rest
could also break certain streaming usecases like the one from #8578
(which this commit fixes).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/rtmp.h')
0 files changed, 0 insertions, 0 deletions