comparison libmpcodecs/vf_ass.c @ 21506:8174acbf0633

Speed up ASS subtitles display by detecting changes between two consecutive rendering results.
author eugeni
date Wed, 06 Dec 2006 18:44:26 +0000
parents 1ac5087585f6
children 0b262e00bc99
comparison
equal deleted inserted replaced
21505:47a16f0da01c 21506:8174acbf0633
324 324
325 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) 325 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
326 { 326 {
327 ass_image_t* images = 0; 327 ass_image_t* images = 0;
328 if (sub_visibility && vf->priv->ass_priv && ass_track && (pts != MP_NOPTS_VALUE)) 328 if (sub_visibility && vf->priv->ass_priv && ass_track && (pts != MP_NOPTS_VALUE))
329 images = ass_render_frame(vf->priv->ass_priv, ass_track, (pts+sub_delay) * 1000 + .5); 329 images = ass_render_frame(vf->priv->ass_priv, ass_track, (pts+sub_delay) * 1000 + .5, NULL);
330 330
331 prepare_image(vf, mpi); 331 prepare_image(vf, mpi);
332 if (images) render_frame(vf, mpi, images); 332 if (images) render_frame(vf, mpi, images);
333 333
334 return vf_next_put_image(vf, vf->dmpi, pts); 334 return vf_next_put_image(vf, vf->dmpi, pts);