36 {
"<i>",
"{\\i1}"}, {
"</i>",
"{\\i0}"},
37 {
"<b>",
"{\\b1}"}, {
"</b>",
"{\\b0}"},
38 {
"<u>",
"{\\u1}"}, {
"</u>",
"{\\u0}"},
39 {
"{",
"\\{"}, {
"}",
"\\}"},
40 {
">",
">"}, {
"<",
"<"},
41 {
"‎",
""}, {
"‏",
""},
42 {
"&",
"&"}, {
" ",
"\\h"},
47 int i, again = 0, skip = 0;
53 const size_t len = strlen(from);
54 if (!strncmp(p, from, len)) {
73 else if (p[0] ==
'\n' && p[1])
75 else if (!skip && *p !=
'\r')
87 const char *ptr = avpkt->
data;
93 int ts_duration = avpkt->
duration != -1 ?
100 *got_sub_ptr = sub->num_rects > 0;
void av_bprintf(AVBPrint *buf, const char *fmt,...)
ptrdiff_t const GLvoid * data
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define AV_BPRINT_SIZE_UNLIMITED
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
const char * name
Name of the codec implementation.
static int webvtt_event_to_ass(AVBPrint *buf, const char *p)
#define FF_ARRAY_ELEMS(a)
Libavcodec external API header.
int ff_ass_add_rect_bprint(AVSubtitle *sub, AVBPrint *buf, int ts_start, int duration)
Same as ff_ass_add_rect, but taking an AVBPrint buffer instead of a string, and assuming raw=0...
main external API structure.
rational number numerator/denominator
static int webvtt_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
AVCodec ff_webvtt_decoder
static const struct @121 webvtt_tag_replace[]
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.