[MPlayer-dev-eng] Re: [PATCH] Let vo directx survive screensaver
Sascha Sommer
saschasommer at freenet.de
Sat Dec 2 17:23:25 CET 2006
Hi,
On Saturday 02 December 2006 16:58, Zuxy Meng wrote:
> Hi,
>
> 2006/12/2, Sascha Sommer <saschasommer at freenet.de>:
> > Hi,
> >
> > but then something is broken because the codec will render to a invalid
> > buffer.
>
> How? "image" is a static variable and all external accesses to it have
> been guarded in my patch.
>
get_image updates the pointers to the image in the mpi struct. The codecs will
use this struct to render the image. They won't call any additional vo
directx functions. With your patch they stay the same when Lock() failed. But
the pointers are not valid after the directx Unlock() even if they happen to
work.
> > Please try the attached patch, eh hack.
>
> The net effect is nearly identical to mine; no segfaults any more:-)
> However there are two small pitfalls:
>
> 1. If mplayer is the activated window before screensaving, then after
> recovered from screensaver mplayer will always be set on top
> regardless of previous settings. I guess you asked me about a line in
> my patch related to this:-)
> 2. If mplayer isn't the activated window before screensaving, then
> after recovered from screensaver mplayer will have a black window; you
> have to activate it to see video come back again.
>
> BTW: maybe the error message about rendering to a hidden surface can
> be shown only once instead of flushing the console.
I'm not sure if these issues are worth fixing. I cannot even reproduce the
crash but if you come up with a clean solution for this feel free to update
the patch.
Regards
Sascha
More information about the MPlayer-dev-eng
mailing list