Go to the documentation of this file.
41 while (*p && strchr(
"/\\_", *p)) {
43 else if (*p ==
'\\')
av_bprintf(buf,
"{\\b1}");
49 while (*p && *p !=
'|') {
50 if (*p !=
'\r' && *p !=
'\n')
67 int *got_sub_ptr,
const AVPacket *avpkt)
71 const char *ptr = avpkt->
data;
80 *got_sub_ptr =
sub->num_rects > 0;
#define AV_BPRINT_SIZE_UNLIMITED
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
static float sub(float src0, float src1)
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.
static int mpl2_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
AVCodec p
The public AVCodec.
const FFCodec ff_mpl2_decoder
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
void ff_ass_decoder_flush(AVCodecContext *avctx)
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
const char * name
Name of the codec implementation.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
main external API structure.
static int mpl2_event_to_ass(AVBPrint *buf, const char *p)
#define FF_CODEC_DECODE_SUB_CB(func)
This structure stores compressed data.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.