56 int prev_chr_is_space = 0;
83 if (!strncmp(p,
" ", 6)) {
97 while (*p && *p !=
'>')
107 else if (!prev_chr_is_space)
131 const char *ptr = avpkt->
data;
void av_bprintf(AVBPrint *buf, const char *fmt,...)
static int sami_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
ptrdiff_t const GLvoid * data
static void flush(AVCodecContext *avctx)
char * av_stristr(const char *s1, const char *s2)
Locate the first case-independent occurrence in the string haystack of the string needle...
static av_cold int init(AVCodecContext *avctx)
static av_const int av_isspace(int c)
Locale-independent conversion of ASCII isspace.
int av_strncasecmp(const char *a, const char *b, size_t n)
Locale-independent case-insensitive compare.
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int readorder, int layer, const char *style, const char *speaker)
Add an ASS dialog to a subtitle.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
static av_cold int sami_init(AVCodecContext *avctx)
static av_cold int end(AVCodecContext *avctx)
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
static av_cold int sami_close(AVCodecContext *avctx)
static void sami_flush(AVCodecContext *avctx)
#define AV_CODEC_FLAG2_RO_FLUSH_NOOP
Do not reset ASS ReadOrder field on flush (subtitles decoding)
#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.
void ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
char * av_strdup(const char *s)
Duplicate the string s.
main external API structure.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok()...
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
int flags2
AV_CODEC_FLAG2_*.
static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
This structure stores compressed data.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.