[FFmpeg-devel] [RFC] Support multiple frames in a singe AVPacket in avcodec_decode_subtitle2

Ronald S. Bultje rsbultje at gmail.com
Tue Oct 1 23:31:21 CEST 2013


On Tue, Oct 1, 2013 at 5:16 PM, Marton Balint <cus at passwd.hu> wrote:

> Hi,
> When I implemented the DVB teletext decoder, I faced a problem: If
> multiple teletext pages are in a single teletext packet, the decoder has no
> way to return multiple AVSubtitles. So the current decoder only return one
> AVSubtitle in that case, an AVSubtitle containing the first decoded page
> from the packet.
> This is not a problem if the user wants to decode only a single teletext
> page (subtitle page), because the same page is not sent twice in a single
> packet. However, if somebody wants to decode all pages, he probably won't
> be able to do so without losing a page here or there.
> I could have split the teletext PES packets (usually around 1472 bytes) at
> the demuxer level to 46-byte packets to overcome this, but I thought it
> would be much better to extend the API the same way it is used now for
> audio decoding, where a single packet can contain multiple frames.



More information about the ffmpeg-devel mailing list