1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00

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
This commit is contained in:
reimar 2007-10-07 08:41:31 +00:00
parent 540c3981ac
commit bc41cde0b7
2 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,7 @@ extern char* get_term_charset(void);
#if defined(FOR_MENCODER) #if defined(FOR_MENCODER)
#undef HAVE_NEW_GUI #undef HAVE_NEW_GUI
int use_gui;
#endif #endif
#ifdef HAVE_NEW_GUI #ifdef HAVE_NEW_GUI

View File

@ -29,6 +29,7 @@ static DWORD WINAPI ThreadProc(void* s);
#include "stream.h" #include "stream.h"
#include "input/input.h" #include "input/input.h"
extern int use_gui;
int stream_fill_buffer(stream_t *s); int stream_fill_buffer(stream_t *s);
int stream_seek_long(stream_t *s,off_t pos); 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){ static DWORD WINAPI ThreadProc(void*s){
#endif #endif
#ifdef HAVE_NEW_GUI
use_gui = 0; // mp_msg may not use gui stuff in forked code
#endif
// cache thread mainloop: // cache thread mainloop:
signal(SIGTERM,exit_sighandler); // kill signal(SIGTERM,exit_sighandler); // kill
while(1){ while(1){