26 #define PARSE_BUF_SIZE (65536)
47 const uint8_t **poutbuf,
int *poutbuf_size,
48 const uint8_t *buf,
int buf_size)
52 int i,
len, buf_pos = 0;
54 av_dlog(avctx,
"DVB parse packet pts=%"PRIx64
", lpts=%"PRIx64
", cpts=%"PRIx64
":\n",
57 for (i=0; i < buf_size; i++)
59 av_dlog(avctx,
"%02x ", buf[i]);
76 av_dlog(avctx,
"Discarding %d bytes\n",
83 if (buf_size < 2 || buf[0] != 0x20 || buf[1] != 0x00) {
84 av_dlog(avctx,
"Bad packet header\n");
129 if (p + len + 6 <= p_end)
131 *poutbuf_size += len + 6;
138 }
else if (*p == 0xff) {
141 av_dlog(avctx,
"Junk at end of packet\n");
155 if (*poutbuf_size > 0)
AVCodecParser ff_dvbsub_parser
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
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.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_log(void *avcl, int level, const char *fmt,...)
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
Libavcodec external API header.
main external API structure.
int cur_frame_start_index
#define AV_NOPTS_VALUE
Undefined timestamp value.