diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-30 17:08:35 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-30 17:08:35 +0000 |
commit | 27d79717d47a4a59885a1433a9fb5cee2c00be58 (patch) | |
tree | 6ca96d4bfdc3bc19a9278d6d91448570275e881d /parser-mecmd.c | |
parent | 5787833ca99a5ebe2d6e2ff06eac46edbdc33f56 (diff) | |
download | mpv-27d79717d47a4a59885a1433a9fb5cee2c00be58.tar.bz2 mpv-27d79717d47a4a59885a1433a9fb5cee2c00be58.tar.xz |
Remove the hack used to pass -dvd, etc into the playlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9748 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'parser-mecmd.c')
-rw-r--r-- | parser-mecmd.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/parser-mecmd.c b/parser-mecmd.c index 29264d7e9c..84c067b5df 100644 --- a/parser-mecmd.c +++ b/parser-mecmd.c @@ -56,16 +56,6 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) char *opt; int no_more_opts = 0; m_entry_t *lst = NULL, *entry = NULL; - void add_file(char* file) { - mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]); - lst = realloc(lst,(nf+2)*sizeof(m_entry_t)); - lst[nf].name = strdup(file); - lst[nf].opts = calloc(2,sizeof(char*)); - entry = &lst[nf]; - no = 0; - memset(&lst[nf+1],0,sizeof(m_entry_t)); - nf++; - } #ifdef MP_DEBUG assert(config != NULL); @@ -104,21 +94,6 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) mp_msg(MSGT_CFGPARSER, MSGL_ERR, "%s is not an MEncoder option\n",opt); goto err_out; } - // Hack for the -vcd ... options - if(strcasecmp(opt,"vcd") == 0) - add_file("VCD Track"); - if(strcasecmp(opt,"dvd") == 0) - add_file("DVD Title"); - if(strcasecmp(opt,"tv") == 0 && argv[i + 1]) { // TV is a bit more tricky - char* param = argv[i + 1]; - char* on = strstr(param,"on"); - for( ; on ; on = strstr(on + 1,"on")) { - if(on[2] != ':' && on[2] != '\0') continue; - if(on != param && *(on - 1) != ':') continue; - add_file("TV Channel"); - break; - } - } if(!entry || (mp_opt->flags & M_OPT_GLOBAL)){ tmp = m_config_set_option(config, opt, argv[i + 1]); if(tmp < 0){ @@ -139,8 +114,16 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) } } i += tmp; - } else /* filename */ - add_file(argv[i]); + } else {/* filename */ + mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]); + lst = realloc(lst,(nf+2)*sizeof(m_entry_t)); + lst[nf].name = strdup(argv[i]); + lst[nf].opts = calloc(2,sizeof(char*)); + entry = &lst[nf]; + no = 0; + memset(&lst[nf+1],0,sizeof(m_entry_t)); + nf++; + } } if(nf == 0) { |