[MPlayer-dev-eng] subtitle partially broken with vob/dvd
attila
attila at pai.kinali.ch
Sun Jul 18 04:24:28 CEST 2004
On Fri, Feb 06, 2004 at 02:37:46AM +0100, Jean-Yves Simon wrote:
> Hello,
>
> Fact: a SPU packet can be split in 2 chunks, first one having a pts,
> second none, Most code out there require the same pts on the sub to
> merge the packets together
>
> Problem: i've seen on plenty dvds where there are, sometimes, between
> those chunks, video chunks. So using the video_pts to know when to
> display subs is wrong, that gives a (slight) sub desynch, but can break
> some subs too
>
> This problem appears in mplayer.c on line ~3641
> float x = d_dvdsub->pts - sh_video->pts;
> if (x < -10 || x > 10) // prevent missing subs on pts reset
> timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay
> - sh_video->pts);
> else timestamp = 90000*(sh_video->timer + sub_delay);
>
>
> The problem is that sh_video->timer appears to be zero'ed at each seek,
> so i need to know the accurate offset (sh_video->timer <->
> d_dvdsub->pts) to get a correct timestamp.
> Yes, getting it with "d_dvdsub->pts - sh_video->pts" seems to work, but
> the resulting timestamp still isn't 100% the same, so i suppose there
> can be cases where it fail, maybe even where the subschunks are
> following each other!?
>
> Anyway, it worked on the vob samples i had here
>
>
> PS: i know this will render the "if else" statement useless, but i
> really don't consider this a good fix :(
Any comments on this patch ?
And we definitly need someone who takes care about the dvd code
and the dvd/vobsub stuff. Kim Minh Kaplan seems to be disapeared.
Any voluneers for those maintance jobs ?
Attila Kinali
More information about the MPlayer-dev-eng
mailing list