From 343ab585e64376b933bd396f01b2009285c30e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 2 Nov 2003 14:12:52 +0000 Subject: Fix SEGFAULT beside error if no plugin loaded yet. Fix one "segfault" of win32 xineui. Next piece of patch for compiling xine under MSVC. CVS patchset: 5676 CVS date: 2003/11/02 14:12:52 --- src/xine-engine/input_rip.c | 8 +++++++- src/xine-engine/load_plugins.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index 8b5cfbb08..3365a9ce1 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,7 +29,7 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.9 2003/10/24 09:34:01 mroi Exp $ + * $Id: input_rip.c,v 1.10 2003/11/02 14:12:52 valtri Exp $ */ /* TODO: @@ -577,6 +577,7 @@ input_plugin_t *rip_plugin_get_instance (xine_stream_t *stream, const char *file free(this); return NULL; } +#ifndef _MSC_VER if (errno != ENOENT && S_ISFIFO(pstat.st_mode)) { this->regular = 0; mode = "wb"; @@ -584,6 +585,11 @@ input_plugin_t *rip_plugin_get_instance (xine_stream_t *stream, const char *file this->regular = 1; mode = "wb+"; } +#else + /* no fifos under MSVC */ + this->regular = 1; + mode = "wb+"; +#endif if ((this->file = fopen(target, mode)) == NULL) { xine_log(this->stream->xine, XINE_LOG_MSG, diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index f4b6fff94..2a263c297 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.159 2003/10/31 22:08:37 valtri Exp $ + * $Id: load_plugins.c,v 1.160 2003/11/02 14:12:52 valtri Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -490,7 +490,7 @@ static void _load_required_plugins(xine_t *this, xine_list_t *list) { if( !node->plugin_class ) { xine_list_delete_current (list); - node = list->cur->content; + node = list->cur ? list->cur->content : NULL; } else node = xine_list_next_content (list); -- cgit v1.2.3