diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-13 11:13:59 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-13 11:13:59 +0000 |
commit | c7d0a61c53ae22df0b6e580d2b9afeef6898d050 (patch) | |
tree | dbfdf3a03f38c49ecd9d1ce3c261523447dd05bf /src | |
parent | b950b11d52da27535dbb081625cf1282c2b25841 (diff) | |
download | xine-lib-c7d0a61c53ae22df0b6e580d2b9afeef6898d050.tar.gz xine-lib-c7d0a61c53ae22df0b6e580d2b9afeef6898d050.tar.bz2 |
fix heuristics to handle invalid MRLs with '#' inside
CVS patchset: 5503
CVS date: 2003/10/13 11:13:59
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/xine.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 235447599..4330bf605 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.257 2003/10/08 05:33:28 valtri Exp $ + * $Id: xine.c,v 1.258 2003/10/13 11:13:59 mroi Exp $ */ /* @@ -506,8 +506,24 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) { */ if ((stream->input_plugin = find_input_plugin (stream, input_source))) { - free(input_source); - break; + xine_log (stream->xine, XINE_LOG_MSG, + "xine: found input plugin : %s\n", + stream->input_plugin->input_class->get_description(stream->input_plugin->input_class)); + if (stream->input_plugin->input_class->eject_media) + stream->eject_class = stream->input_plugin->input_class; + stream->meta_info[XINE_META_INFO_INPUT_PLUGIN] + = strdup (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class)); + + if (!stream->input_plugin->open(stream->input_plugin)) { + xine_log (stream->xine, XINE_LOG_MSG, + _("xine: input plugin cannot open MRL [%s]\n"),mrl); + stream->input_plugin->dispose(stream->input_plugin); + stream->input_plugin = NULL; + stream->err = XINE_ERROR_INPUT_FAILED; + } else { + free(input_source); + break; + } } free(input_source); @@ -522,25 +538,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) { _("xine: cannot find input plugin for MRL [%s]\n"),mrl); stream->err = XINE_ERROR_NO_INPUT_PLUGIN; return 0; - } else { - xine_log (stream->xine, XINE_LOG_MSG, - "xine: found input plugin : %s\n", - stream->input_plugin->input_class->get_description(stream->input_plugin->input_class)); - if (stream->input_plugin->input_class->eject_media) - stream->eject_class = stream->input_plugin->input_class; - stream->meta_info[XINE_META_INFO_INPUT_PLUGIN] - = strdup (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class)); } - if (!stream->input_plugin->open(stream->input_plugin)) { - xine_log (stream->xine, XINE_LOG_MSG, - _("xine: input plugin cannot open MRL [%s]\n"),mrl); - stream->input_plugin->dispose(stream->input_plugin); - stream->input_plugin = NULL; - stream->err = XINE_ERROR_INPUT_FAILED; - return 0; - } - if (*stream_setup) { while (stream_setup && *stream_setup && *(++stream_setup)) { |