[MPlayer-dev-eng] [PATCH] forked code may not use GUI

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Oct 6 18:51:48 CEST 2007


Hello,
On Sat, Oct 06, 2007 at 06:28:38PM +0200, A Mennucc wrote:
> there was a discussion long ago regarding  bug
> http://bugs.debian.org/396962
> 
> at that time, Reimar proposed a simple and effective patch
> (see  message below) but that
> unfortunately would break mencode compilation
> 
> I have revised his idea, see attached patch

Hmm... I actually had my own version still in my tree, a tiny bit
simpler, and IMO putting the dummy use_gui into mp_msg slightly better
solves the problem of confining hacks (since that FOR_MENCODER thing
there is already a hack).

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: stream/cache2.c
===================================================================
--- stream/cache2.c	(revision 24705)
+++ stream/cache2.c	(working copy)
@@ -29,6 +29,7 @@
 
 #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 @@
 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){
Index: mp_msg.c
===================================================================
--- mp_msg.c	(revision 24705)
+++ mp_msg.c	(working copy)
@@ -16,6 +16,7 @@
 
 #if defined(FOR_MENCODER)
 #undef HAVE_NEW_GUI
+int use_gui;
 #endif
 
 #ifdef HAVE_NEW_GUI


More information about the MPlayer-dev-eng mailing list