From 413b2e3b0f20cf3fc170d6a711cd93de124d5c7e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 6 Jan 2013 21:44:15 +0100 Subject: vo_xv: fix compilation when shared memory header files are not available This is an extremely obscure situation, but can actually happen on OpenBSD. --- video/out/vo_xv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'video') diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 96cb072d17..d09c608a2f 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -229,10 +229,8 @@ static void allocate_xvimage(struct vo *vo, int foo) { struct xvctx *ctx = vo->priv; struct vo_x11_state *x11 = vo->x11; - /* - * allocate XvImages. FIXME: no error checking, without - * mit-shm this will bomb... trzing to fix ::atmos - */ + // align it for faster OSD rendering (draw_bmp.c swscale usage) + int aligned_w = FFALIGN(ctx->image_width, 32); #ifdef HAVE_SHM if (x11->display_is_local && XShmQueryExtension(x11->display)) ctx->Shmem_Flag = 1; @@ -240,7 +238,6 @@ static void allocate_xvimage(struct vo *vo, int foo) ctx->Shmem_Flag = 0; mp_tmsg(MSGT_VO, MSGL_INFO, "[VO_XV] Shared memory not supported\nReverting to normal Xv.\n"); } - int aligned_w = FFALIGN(ctx->image_width, 32); if (ctx->Shmem_Flag) { ctx->xvimage[foo] = (XvImage *) XvShmCreateImage(x11->display, x11->xv_port, -- cgit v1.2.3