From bc41cde0b7d62fa4bb30513c66c68ae2bc7229c4 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 7 Oct 2007 08:41:31 +0000 Subject: [PATCH] Make sure forked code does not try to display a GTK message box (and thus crashes) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24717 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp_msg.c | 1 + stream/cache2.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mp_msg.c b/mp_msg.c index 7f4ff70e87..76fdc06765 100644 --- a/mp_msg.c +++ b/mp_msg.c @@ -16,6 +16,7 @@ extern char* get_term_charset(void); #if defined(FOR_MENCODER) #undef HAVE_NEW_GUI +int use_gui; #endif #ifdef HAVE_NEW_GUI diff --git a/stream/cache2.c b/stream/cache2.c index 0e6f2eef9b..65259cfb60 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -29,6 +29,7 @@ static DWORD WINAPI ThreadProc(void* s); #include "stream.h" #include "input/input.h" +extern int use_gui; int stream_fill_buffer(stream_t *s); int stream_seek_long(stream_t *s,off_t pos); @@ -305,6 +306,9 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ static DWORD WINAPI ThreadProc(void*s){ #endif +#ifdef HAVE_NEW_GUI + use_gui = 0; // mp_msg may not use gui stuff in forked code +#endif // cache thread mainloop: signal(SIGTERM,exit_sighandler); // kill while(1){