27 #define PARSE_BUF_SIZE (65536)
48 const uint8_t **poutbuf,
int *poutbuf_size,
49 const uint8_t *buf,
int buf_size)
53 int i,
len, buf_pos = 0;
55 av_dlog(avctx,
"DVB parse packet pts=%"PRIx64
", lpts=%"PRIx64
", cpts=%"PRIx64
":\n",
58 for (i=0; i < buf_size; i++)
60 av_dlog(avctx,
"%02x ", buf[i]);
77 av_dlog(avctx,
"Discarding %d bytes\n",
84 if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) {
85 av_dlog(avctx,
"Bad packet header\n");
130 if (p + len + 6 <= p_end)
132 *poutbuf_size += len + 6;
139 }
else if (*p == 0xff) {
142 av_dlog(avctx,
"Junk at end of packet\n");
156 if (*poutbuf_size > 0)
AVCodecParser ff_dvbsub_parser
static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_WB24 AV_RB16
static av_cold int dvbsub_parse_init(AVCodecParserContext *s)
static int dvbsub_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
bitstream reader API header.
void av_log(void *avcl, int level, const char *fmt,...)
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
#define av_dlog(pctx,...)
av_dlog macros Useful to print debug messages that shouldn't get compiled in normally.
main external API structure.
int cur_frame_start_index
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
struct DVBSubParseContext DVBSubParseContext
#define AV_NOPTS_VALUE
Undefined timestamp value.