[MPlayer-dev-eng] [PATCH] Better handling of win32 GUI thread

Zuxy Meng zuxy.meng at gmail.com
Mon Dec 3 13:33:25 CET 2007


Hi,

2007/12/2, Erik Lunchpail <erik_27can at yahoo.com>:
>
> --- Zuxy Meng <zuxy.meng at gmail.com> wrote:
>
> > Hi,
> >
> > 2007/11/1, Zuxy Meng <zuxy.meng at gmail.com>:
> > > Hi,
> > >
> > > The attached patch contains two fixes:
> > >
> > > 1. Use _beginthreadex instead of CreateThread to create the thread
> > so
> > > as to avoid a small memory leak when mplayer is linked to MS CRT.
> > >
> > > 2. Remove the call to TerminateThread(). For one thing this isn't
> > the
> > > recommended way to terminate a thread; for another it's called with
> > an
> > > incorrect argument and therefore has always failed: the first
> > > parameter should be a handle to the thread instead of the thread
> > > function. And without this call the GUI thread will terminate
> > itself
> > > anyway once mygui == NULL.
> >
> > Update patch that will free the GUI thread in a cleaner way.
> >
>
> Although I agree it needs better thread handling, this broke the gui
> functionality. The thread exits when you close any of the dialogs, the
> main and sub window have lost almost all interaction with mplayer.

Thanks for pointing that! Would u help try if the attached patch works?

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: interface.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071203/c25859f9/attachment.asc>


More information about the MPlayer-dev-eng mailing list