[MPlayer-dev-eng] [PATCH] some DVD subtitles won't show

Lehel Bernadt lehel at pmc-services.hu
Fri Jun 2 15:05:48 CEST 2006


Well i submitted a patch fixing all these issues last year. I thought it got 
applied, but now i have to realise the mplayer.c part was not...

the mail & final patch:
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2005-August/036621.html
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050928/9f0850e3/mplayer-dvd-20050927.bin

>
> Hello,
>
> the problem with obscured DVD subtitles is apparently an old one.
>
> In mplayer.c there are some helper vars to enumerate all available subs,
>
> 	int global_sub_pos, global_sub_indices[];
>
> whereas text subs, vobsubs, demuxed subs each have their separate index.
> The way it is implemented, it obviously cannot work with discontiguous set
> of numbers:
>
> 	global_sub_pos = global_sub_indices[SUB_SOURCE_VOBSUB] + vobsub_id;
> 	vobsub_id = global_sub_pos - global_sub_indices[SUB_SOURCE_VOBSUB];
> 	...
>
> As a consequence, dvdsub_id (from -sid option) refers not to actual ID,
> but is an (array) index. For mencoder, -sid specifies the ID.
> Both mplayer and mencoder use
>
> 	if(...) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
>
> and one of those seems wrong. In fact, every use of dvdsub_id is suspect.
> Besides, dvdsub_id also applies to ogg/mkv, so it's really a misnomer.
>
> Perhaps a global_sub_list[] of { source, id, lang } would be in order?
>
> Ok, enough with that, attached is a diff to fix the problem.



More information about the MPlayer-dev-eng mailing list