[MPlayer-dev-eng] [PATCH] Move SSA/ASS subtitles handling out of mkv demuxer

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sun Dec 30 03:01:37 CET 2007


Hi,

this patch moves ass subtitle parsing out of mkv demuxer.

Headers are stored in sh_sub_t codecdata field and parsed lazily in 
update_subtitles. Events are passed as demuxer packets and handled also in 
update_subtitles. This way, subtitle handling in mkv demuxer is the same for 
all types of subtitles (except vobsub).

update_subtitles() becomes more complicated. There are 4 cases now:
1. 't' subs with libass -> convert to struct subtitle then add to ass_track
2. 'a' subs with libass -> add to ass_track directly
3. 't' subs without libass -> passed to sub_add_text
4. 'a' subs without libass -> 8 leading fields stripped, then passed to 
sub_add_text

With these changes, subtitles are always put into demuxer packets unchanged. 
Libass support in lavf demuxer will be also much easier to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.patch
Type: text/x-diff
Size: 10564 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071230/2a2b85c1/attachment.patch>


More information about the MPlayer-dev-eng mailing list