-alang/-slang support in mencoder too

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5437 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-03-31 22:01:54 +00:00
parent 69c5d80089
commit 0f88f9046e
3 changed files with 13 additions and 5 deletions

View File

@ -21,6 +21,8 @@
{"dvd", &dvd_title, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
{"dvdangle", &dvd_angle, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
{"chapter", dvd_parse_chapter_range, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
{"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
#else
{"dvd", "MPlayer was compiled WITHOUT libdvdread support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#endif

View File

@ -281,11 +281,6 @@ static config_t mplayer_opts[]={
{"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
#endif
#ifdef USE_DVDREAD
{"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif
{"gui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"nogui", &use_gui, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},

View File

@ -124,6 +124,8 @@ int audio_id=-1;
int video_id=-1;
int dvdsub_id=-1;
int vobsub_id=-1;
char* audio_lang=NULL;
char* dvdsub_lang=NULL;
static char* spudec_ifo=NULL;
static int has_audio=1;
@ -606,6 +608,15 @@ divx4_param.rc_reaction_ratio = 20;
printf("success: format: %d data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos));
#ifdef USE_DVDREAD
if(stream->type==STREAMTYPE_DVD){
current_module="dvd lang->id";
if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
if(dvdsub_lang && dvdsub_id==-1) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
current_module=NULL;
}
#endif
if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0);
#ifdef HAVE_LIBCSS