Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f49667d83db_3396_WebVTT_capability_tester.vtt
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
WebVTT subtitle tracks have four kinds. Certain downstream muxers
(such as for WebM) need to know which WebVTT kind this is, in order to
specify the codec id of the output track.
A new private input option, "-kind", has been added to the WebVTT
demuxer. It accepts as a value any of "subtitles" (the default),
"captions", "descriptions", and "metadata". The kind option value is
used to assign a value to the stream disposition flag, to which four
new values have been added, corresponding the four WebVTT kinds.
Signed-off-by: Matthew Heaney <matthewjheaney@google.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
Currently the WebVTT demuxer parses the cues but throws away
the cue id (the optional first line of the cue) and cue
settings (the optional rendering instructions that follow
the timestamp).
However, in order to write inband text tracks (to WebM
files), the entire cue payload from the WebVTT source must
be preserved.
This commit makes no change to the data part of the output
buffer packet (where the actual cue text is stored), but
does add the cue id and settings as a side data items, if
they're present in the cue. Existing code that cares only
about the data part of the packet can continue to ignore the
side data.
There are two new packet data type flags,
AV_PKT_DATA_WEBVTT_IDENTIFIER and
AV_PKT_DATA_WEBVTT_SETTINGS.