summaryrefslogtreecommitdiff
path: root/libavformat/webvttdec.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/webvttdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-081-2/+1
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/webvttdec: Accept \r as newlineAndreas Rheinhardt2020-06-261-1/+1
| | | | | | | | | | | | | After parsing the end timestamp of a WebVTT cue block, the current code skips everything after the start of the timestamp that is not a \t, ' ' or \n and treats what is next as the start of a WebVTT cue settings list. Yet if there is no such list, but a single \r, this will skip a part of the cue payload (namely everything until the first occurence of \t, ' ' or \n) and treat what has not been skipped as the beginning of the WebVTT cue settings list that extends until the next \r or \n (or the end). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webvttdec: Fix memleak upon read header failureAndreas Rheinhardt2020-06-151-0/+2
| | | | | | | The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webvttdec: Remove write-only variableAndreas Rheinhardt2020-04-231-3/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavf/webvtt: fix ffmpeg -h demuxer=webvtt can't dump optionsJun Zhao2019-06-141-5/+5
| | | | | | fix ffmpeg -h demuxer=webvtt can't dump options Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-2/+2
| | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/webvttdec: Don't stop parsing on commentsRicardo Constantino2015-10-121-1/+2
| | | | Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
* avformat/subtitles: forward log context in ff_subtitles_queue_finalize() for ↵Clément Bœsch2015-09-101-1/+1
| | | | logging
* avformat/webvttdec: Dont skip over a never checked byte after -->Michael Niedermayer2014-01-071-1/+1
| | | | | | | 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>
* lavf/webvttdec: use private option to specify WebVTT kindMatthew Heaney2013-06-251-0/+24
| | | | | | | | | | | | | | | 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>
* lavf/webvttdec: factorize identifier and settings side data code.Clément Bœsch2013-06-011-21/+13
|
* lavf/webvttdec: save cue id and settings as side dataMatthew Heaney2013-06-011-11/+42
| | | | | | | | | | | | | | | | | | | | | | 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.
* lavf/webvtt: use ff_subtitles_read_chunk().Clément Bœsch2013-01-031-30/+10
| | | | | The FATE test is updated because the line breaks in the dialogue rectangles are now proper CRLF.
* lavf: remove generic index flag from text subtitles.Clément Bœsch2013-01-021-1/+0
| | | | This flag is not necessary.
* lavf: use ff_subtitles_queue_seek() for text subtitles demuxers.Clément Bœsch2012-12-021-0/+9
|
* lavf/webvttdec: fix potential timing overflows.Clément Bœsch2012-10-211-2/+2
| | | | Should fix CID733781 and CID733782.
* WebVTT demuxer and decoder.Clément Bœsch2012-09-231-0/+188