From 7d553a4c26e3add66d636bcde6b74fb48cfceabf Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 25 Dec 2013 17:06:32 +0100 Subject: vo_x11/vo_xv: fix build when using --disable-xext --- video/out/vo_xv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'video/out/vo_xv.c') diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 7cd63fe965..ff5cfdbcd3 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -33,7 +33,7 @@ #include "config.h" -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT #include #include #include @@ -91,7 +91,7 @@ struct xvctx { struct mp_rect dst_rect; uint32_t max_width, max_height; // zero means: not set int Shmem_Flag; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT XShmSegmentInfo Shminfo[2]; int Shm_Warned_Slow; #endif @@ -490,7 +490,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) struct vo_x11_state *x11 = vo->x11; // align it for faster OSD rendering (draw_bmp.c swscale usage) int aligned_w = FFALIGN(ctx->image_width, 32); -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (x11->display_is_local && XShmQueryExtension(x11->display)) { ctx->Shmem_Flag = 1; x11->ShmCompletionEvent = XShmGetEventBase(x11->display) @@ -544,7 +544,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) static void deallocate_xvimage(struct vo *vo, int foo) { struct xvctx *ctx = vo->priv; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (ctx->Shmem_Flag) { XShmDetach(vo->x11->display, &ctx->Shminfo[foo]); shmdt(ctx->Shminfo[foo].shmaddr); @@ -557,7 +557,7 @@ static void deallocate_xvimage(struct vo *vo, int foo) XFree(ctx->xvimage[foo]); ctx->xvimage[foo] = NULL; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT ctx->Shminfo[foo] = (XShmSegmentInfo){0}; #endif @@ -573,7 +573,7 @@ static inline void put_xvimage(struct vo *vo, XvImage *xvi) struct mp_rect *dst = &ctx->dst_rect; int dw = dst->x1 - dst->x0, dh = dst->y1 - dst->y0; int sw = src->x1 - src->x0, sh = src->y1 - src->y0; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (ctx->Shmem_Flag) { XvShmPutImage(x11->display, ctx->xv_port, x11->window, x11->vo_gc, xvi, src->x0, src->y0, sw, sh, @@ -627,7 +627,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd) static void wait_for_completion(struct vo *vo, int max_outstanding) { -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT struct xvctx *ctx = vo->priv; struct vo_x11_state *x11 = vo->x11; if (ctx->Shmem_Flag) { -- cgit v1.2.3