Mercurial > mplayer.hg
diff mpcommon.c @ 31686:b41cbf02f854
subtitles: convert SRT/MicroDVD markup into ASS markup
As the title says. If libass support is enabled, in SRT subs, HTML-style
markup (<b>, </i>, </font>, etc.) is converted to ASS tags. Similarly,
MicroDVD-style markup is converted.
Patch by ubitux, ubitux AT gmail DOT com.
author | greg |
---|---|
date | Sun, 18 Jul 2010 22:00:48 +0000 |
parents | f15df2e3081b |
children | 55dacfca4a43 |
line wrap: on
line diff
--- a/mpcommon.c Sun Jul 18 21:39:57 2010 +0000 +++ b/mpcommon.c Sun Jul 18 22:00:48 2010 +0000 @@ -231,7 +231,7 @@ if (subpts != MP_NOPTS_VALUE) { subtitle tmp_subs = {0}; if (endpts == MP_NOPTS_VALUE) endpts = subpts + 3; - sub_add_text(&tmp_subs, packet, len, endpts); + sub_add_text(&tmp_subs, packet, len, endpts, 0); tmp_subs.start = subpts * 100; tmp_subs.end = endpts * 100; ass_process_subtitle(ass_track, &tmp_subs); @@ -258,7 +258,7 @@ len -= p - packet; packet = p; } - sub_add_text(&subs, packet, len, endpts); + sub_add_text(&subs, packet, len, endpts, 1); set_osd_subtitle(&subs); } if (d_dvdsub->non_interleaved)