21 #include "libavutil/common.h"
22 #include "libavutil/intreadwrite.h"
27 uint8_t **poutbuf,
int *poutbuf_size,
28 const uint8_t *
buf,
int buf_size,
int keyframe){
29 if (buf_size > 0xffff)
return 0;
30 *poutbuf_size = buf_size + 2;
33 memcpy(*poutbuf + 2, buf, buf_size);
38 .
name =
"text2movsub",
43 uint8_t **poutbuf,
int *poutbuf_size,
44 const uint8_t *
buf,
int buf_size,
int keyframe){
45 if (buf_size < 2)
return 0;
48 memcpy(*poutbuf, buf + 2, *poutbuf_size);
53 .
name =
"mov2textsub",
AVBitStreamFilter ff_text2movsub_bsf
static int text2movsub(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
AVBitStreamFilter ff_mov2textsub_bsf
Libavcodec external API header.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
main external API structure.
static int mov2textsub(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)