[FFmpeg-devel] [RFC] AVSubtitles rework
ubitux at gmail.com
Sun Sep 2 13:08:31 CEST 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 490 bytes
Desc: not available
More information about the ffmpeg-devel