diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-08-15 18:24:14 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-08-15 18:24:14 +0000 |
commit | dc0fe79d2fe5697b99e138ff3aacd5d7a63df04c (patch) | |
tree | 2550b940245fa404d66b73e31bd58133c2a8a347 /src/video_out/video_out_xv.c | |
parent | 6d62682436c03cb31e395bcb2fdde1296cdf47f1 (diff) | |
download | xine-lib-dc0fe79d2fe5697b99e138ff3aacd5d7a63df04c.tar.gz xine-lib-dc0fe79d2fe5697b99e138ff3aacd5d7a63df04c.tar.bz2 |
patch - save old XErrorHandler by Mark Thomas
CVS patchset: 2461
CVS date: 2002/08/15 18:24:14
Diffstat (limited to 'src/video_out/video_out_xv.c')
-rw-r--r-- | src/video_out/video_out_xv.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index e2ef7f4b6..0264cd18e 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.126 2002/08/15 03:12:25 miguelfreitas Exp $ + * $Id: video_out_xv.c,v 1.127 2002/08/15 18:24:14 miguelfreitas Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -132,6 +132,8 @@ struct xv_driver_s { int use_colorkey; uint32_t colorkey; + + int (*x11_old_error_handler) (Display *, XErrorEvent *); }; int gX11Fail; @@ -214,14 +216,15 @@ int HandleXError (Display *display, XErrorEvent *xevent) { static void x11_InstallXErrorHandler (xv_driver_t *this) { - XSetErrorHandler (HandleXError); + this->x11_old_error_handler = XSetErrorHandler (HandleXError); XFlush (this->display); } static void x11_DeInstallXErrorHandler (xv_driver_t *this) { - XSetErrorHandler (NULL); + XSetErrorHandler (this->x11_old_error_handler); XFlush (this->display); + this->x11_old_error_handler = NULL; } static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, @@ -1143,6 +1146,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->deinterlace_frame.image = NULL; this->use_colorkey = 0; this->colorkey = 0; + this->x11_old_error_handler = NULL; XAllocNamedColor(this->display, DefaultColormap(this->display, this->screen), |