[FFmpeg-devel] [PATCH 2/4] add ASS parser
Michael Niedermayer
michaelni
Wed Jul 7 21:13:38 CEST 2010
On Tue, Jul 06, 2010 at 10:54:54PM +0200, Aurelien Jacobs wrote:
[...]
> -static int read_packet(AVFormatContext *s, AVPacket *pkt)
> +static int ass_parse(AVCodecParserContext *s, AVCodecContext *avctx,
> + const uint8_t **poutbuf, int *poutbuf_size,
> + const uint8_t *buf, int buf_size)
> {
> ASSContext *ass = s->priv_data;
> + if (!ass->event_buffer)
> + ass_read_header(s, avctx, buf, buf_size);
>
> + if (ass->event_index >= ass->event_count) {
> + *poutbuf = NULL;
> + *poutbuf_size = 0;
> + return buf_size;
> + }
>
> + *poutbuf = ass->event[ass->event_index++];
> + *poutbuf_size = strlen(*poutbuf);
> + s->pts = s->dts = get_pts(*poutbuf);
> + if (ass->event_index >= ass->event_count)
> + return buf_size;
> + return *poutbuf_size;
> }
i dont see how this would work with seeking?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100707/4443ceb9/attachment.pgp>
More information about the ffmpeg-devel
mailing list