mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 09:59:44 +00:00
support for comma-separated language codes in -slang
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21220 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6913dd5d92
commit
a813415ee7
@ -466,8 +466,10 @@ void mp_dvdnav_update_mouse_pos(stream_t *stream, int32_t x, int32_t y, int* but
|
||||
int dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
|
||||
dvdnav_priv_t * priv=(dvdnav_priv_t*)stream->priv;
|
||||
uint8_t format, lg, k;
|
||||
uint16_t lang, lcode = (language[0] << 8) | (language[1]);
|
||||
uint16_t lang, lcode;
|
||||
|
||||
while(language && strlen(language)>=2) {
|
||||
lcode = (language[0] << 8) | (language[1]);
|
||||
for(k=0; k<32; k++) {
|
||||
lg = dvdnav_get_spu_logical_stream(priv->dvdnav, k);
|
||||
if(lg == 0xff) continue;
|
||||
@ -476,6 +478,9 @@ int dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
|
||||
return k;
|
||||
}
|
||||
}
|
||||
language += 2;
|
||||
while(language[0]==',' || language[0]==' ') ++language;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user