Mercurial > mplayer.hg
comparison mpcommon.c @ 27498:d895515b366d
libass: add a new ass_process_data() to process demuxed subtitle packets
conforming to the ASS spec
author | aurel |
---|---|
date | Fri, 05 Sep 2008 15:07:06 +0000 |
parents | 89971b14c335 |
children | e54c9b7eb0d8 |
comparison
equal
deleted
inserted
replaced
27497:ed77f7dee121 | 27498:d895515b366d |
---|---|
120 if (ass_enabled) { | 120 if (ass_enabled) { |
121 sh_sub_t* sh = d_dvdsub->sh; | 121 sh_sub_t* sh = d_dvdsub->sh; |
122 ass_track = sh ? sh->ass_track : NULL; | 122 ass_track = sh ? sh->ass_track : NULL; |
123 if (!ass_track) continue; | 123 if (!ass_track) continue; |
124 if (type == 'a') { // ssa/ass subs with libass | 124 if (type == 'a') { // ssa/ass subs with libass |
125 ass_process_chunk(ass_track, packet, len, | 125 ass_process_data(ass_track, packet, len); |
126 (long long)(pts*1000 + 0.5), | |
127 (long long)((endpts-pts)*1000 + 0.5)); | |
128 } else { // plaintext subs with libass | 126 } else { // plaintext subs with libass |
129 vo_sub = NULL; | 127 vo_sub = NULL; |
130 if (pts != MP_NOPTS_VALUE) { | 128 if (pts != MP_NOPTS_VALUE) { |
131 if (endpts == MP_NOPTS_VALUE) endpts = pts + 3; | 129 if (endpts == MP_NOPTS_VALUE) endpts = pts + 3; |
132 sub_clear_text(&subs, MP_NOPTS_VALUE); | 130 sub_clear_text(&subs, MP_NOPTS_VALUE); |