[FFmpeg-devel] [RFC] Filtering of data packets

Nicolas George nicolas.george at normalesup.org
Thu Jul 18 18:51:01 CEST 2013

Le decadi 30 messidor, an CCXXI, Michael Niedermayer a écrit :
> >   The packet data and size can go in AVFrame.data[0] and
> >   AVFrame.linesize[0].
> smells like a hack

Putting the data in data seems quite logical ;-) And audio already abuses
linesize somehow.

> Only if you are lucky
> Real files are not guranteed to e strictly correctly interleaved
> also streams can stop and start and have gaps if you are unlucky
> enough.

Well, if there 1 giga-octet of data between a video frame and the
corresponding subtitle in an un-seekable medium, there is absolutely nothing
that can be done except store at least 1 giga-octet of data somewhere.

Most broken situations can worked around, but the work-around will depend on
the constraints (streamed or from file, amount of memory available, etc.).

> In a sane world subtitle streams would have sane keyframe intervals
> and there would be subtitle packets every 1-2sec

The world is insane ;-( Or did you mean that it would be the demuxer's job
to insert dummy subtitles packets? It does not look like a very practical
solution (especially since the duration may not be available to the
demuxer), and a major API break on top.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130718/de2d39f2/attachment.asc>

More information about the ffmpeg-devel mailing list