[FFmpeg-devel] [RFC] AVSubtitles rework

Clément Bœsch ubitux at gmail.com
Sun Sep 2 13:08:31 CEST 2012


Hi,

After speaking a little with Nicolas & Alexander yesterday, it appeared
that introducing avcodec_get_subtitle_defaults()/avcodec_alloc_subtitle()
to avoid ABI problems with sizeof(AVSubtitle) would be the first step in
improving the current subtitles situation.

So while I'm at it right now, I have a few questions.

Do we want to move the AVSubtitleRect from AVSubtitles to the codec
context (and keep a pointer in the AVSubtitleRect)? This would allow the
to use av_free() on the AVSubtitles instead of the current
avsubtitle_free(), just like it's done for frames.

Also, adding the AVSubtitle allocation will cause problem for the
-fix_sub_duration option recently added in ffmpeg (0cad101e) since we
can't swap the AVSubtitle anymore. The AVSubtitle will be allocated only
once (just like decoded_frame, we would introduce a decoded_subtitle in
the input stream), a pointer copy won't work AFAICT. The question is then,
how do we want to support such subtitles copy props? The only similar
thing I see for the equivalent AVFrame is the copy props in lavfi. Any
suggestion?

Regards,

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120902/f53c16b6/attachment.asc>


More information about the ffmpeg-devel mailing list