diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-15 22:56:26 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-19 11:54:23 +0100 |
commit | c1b6acde36c5a38df0c48bfdcd950bb882f7b1d8 (patch) | |
tree | bc9b0109b5bebb4469d3e18cde59925646834001 /libavcodec/tests | |
parent | 6221491f9027c55464c3995d67c30e000608ddb2 (diff) | |
download | ffmpeg-c1b6acde36c5a38df0c48bfdcd950bb882f7b1d8.tar.gz |
avformat/matroskaenc: Allow to use custom reformatting functions
Matroska uses variable-length elements and in order not to waste
bytes on length fields, the length of the data to write needs to
be known before writing the length field. Annex B H.264/5 and
WavPack need to be reformatted to know this length and this
currently involves writing the data into temporary buffers;
AV1 sometimes suffers from this as well.
This commit aims to solve this by adding a callback that is called
twice per packet: Once to get the size and once to actually write
the data. In case of WavPack and AV1 (where parsing is cheap due
to length fields) both calls will just parse the data with only
the second function writing anything. For H.264/5, the position
of the NALUs will need to be stored to be written lateron.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/tests')
0 files changed, 0 insertions, 0 deletions