[MPlayer-dev-eng] [Patch]vobsub subtitle enhancement
Kim Minh Kaplan
kmkaplan at selfoffice.com
Wed Oct 16 17:08:19 CEST 2002
hephooey writes:
> i've made a small enhancement for vobsub subtitle, with this patch mplayer can
> switch between subtitles of different languages during playing by press 'j',
> I move a small function of Gui(GetLanguage) to vobsub.c cause i have to use
> it without gui.
> Please test it, thank you.
This sounds nice but... The mapping between country code -> country
real name has nothing to do in vobsub.c, this is purely presentation
junk. OTOH vobsub could export the country code. Also adding another
global variable is a bad idea. I find that I should not have made
vobsub_id a global in the first place.
Can you do your stuff without those two problems if you have something
like that in vobsub.c:
char*
vobsub_get_id(void *vobhandle, int index)
{
vobsub_t* vob = (vobsub_t*) vobhandle;
if (index < 0 || vob->spu_streams_size <= index)
return NULL;
return vob->spu_streams[index].id;
}
Kim Minh.
More information about the MPlayer-dev-eng
mailing list