[FFmpeg-devel] [PATCH 1/8] lavf: add internal demuxer helpers for subtitles.

Wolfram Gloger wmglo at dent.med.uni-muenchen.de
Wed Jun 20 12:15:07 CEST 2012

Nicolas George <nicolas.george at normalesup.org> writes:

> Le primidi 1er messidor, an CCXX, Clément Bœsch a écrit :
>> That's not the only reasons: event will always be a null terminated string
>> (yes I fixed the doxy-comment), and len is the length, not the size (it
>> doesn't count the zero, and is used to avoid some calls to strlen).
> Do you actually need that, except for the merge part?
> Also, note that currently, the text subtitles packets do not include the
> terminating NUL character, while your ff_subtitles_queue_read_packet
> includes it.

I too would prefer the variant that is _not_ necessarily NUL-terminated
(as for AVPacket.data).
It seems just more natural with general ffmpeg practice.
'len' is the correct name then.

>> But they are, in the sense that it only works with strings and they're
>> meant to be a full list of "text events" ordered by time (and pos).
> I do not see what makes them only work for strings.

Same here.

It occurs to me that your proposal is like a lightweight
AVCodecParserContext.  Many existing and future parsers could benefit
from this general framework.


More information about the ffmpeg-devel mailing list