[FFmpeg-devel] [PATCH] add avsubtitle_free

Reimar Döffinger Reimar.Doeffinger
Sat Jul 10 22:59:17 CEST 2010


On Sat, Jul 10, 2010 at 10:21:04PM +0200, Michael Niedermayer wrote:
> do we want subtitles to be handled differently?
> if yes, then your patch is ok
> if no, well ...
> 
> it might make sense if our subtitle decoders could via a get_buffer()
> equivalent draw subtitles directly into some player buffer that will
> be displayed. But maybe this becomes too convoluted, i dont know
> 
> but as said ive not had time to think about this as much as one
> should to make a good suggestion about which way to go.
> 
> also if there ever is a subtitle decoder that has P frames, a
> system closer to video codecs will be more efficient.

Well, I think subtitles have enough complexities, also due to
num_rects a get_buffer/release_buffer would have to support a lot
more "outstanding" frames than for video, so it would be different
anyway.
Also more than one subtitle frame per second is unrealistic, which
means that efficiency is not that important and P-frames are unlikely
to be used since that works too bad with seeking.
Also, currently out API only supports paletted data (well, or so I though,
I guess we could set avctx->pix_fmt, but e.g. the PGS decoder sets it to
PIX_FMT_RGB32 but uses a paletted format...).
Overall I just think we should get this _used_ (or more precisely usable)
first, then we will notice the full crappiness of the API and then can
fix it if necessary.



More information about the ffmpeg-devel mailing list