diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-28 13:47:06 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-28 13:47:06 +0000 |
commit | 11ea8307e4d7ee98cdf6be4206ccd6b96ec06341 (patch) | |
tree | 01605acc9d8c32113285d864ee5ac79fe1a8ef5d /cfgparser.c | |
parent | 581e719695cdece89d7e6f2974b5a2967f84746c (diff) | |
download | mpv-11ea8307e4d7ee98cdf6be4206ccd6b96ec06341.tar.bz2 mpv-11ea8307e4d7ee98cdf6be4206ccd6b96ec06341.tar.xz |
New option use-stdin to use when stdin will be used as a file
Auto enable use-stdin when - is in the command line
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4891 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'cfgparser.c')
-rw-r--r-- | cfgparser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cfgparser.c b/cfgparser.c index a9989a5394..30701af4f5 100644 --- a/cfgparser.c +++ b/cfgparser.c @@ -302,6 +302,10 @@ static int config_is_entry_option(m_config_t *config, char *opt, char *param) { if(!param) return ERR_MISSING_PARAM; entry = parse_playlist_file(param); + if(!entry) { + mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Playlist parsing failed: %s\n",param); + return 1; + } } if(! IS_RUNNING(config)) { @@ -1009,6 +1013,8 @@ int m_config_parse_command_line(m_config_t *config, int argc, char **argv, char play_tree_t* entry = play_tree_new(); mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]); play_tree_add_file(entry,argv[i]); + if(strcasecmp(argv[i],"-") == 0) + m_config_set_option(config,"use-stdin",NULL); /* opt is not an option -> treat it as a filename */ UNSET_GLOBAL(config); // We start entry specific options if(config->last_entry == NULL) |