summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-06 21:44:15 +0100
committerwm4 <wm4@nowhere>2013-01-06 21:44:15 +0100
commit413b2e3b0f20cf3fc170d6a711cd93de124d5c7e (patch)
treef62492dda0ddfa19df039452ac5e0e5ab52492f6 /video
parent9b3bf76d27c9cd87685aee4cb6652ef7071237b3 (diff)
downloadmpv-413b2e3b0f20cf3fc170d6a711cd93de124d5c7e.tar.bz2
mpv-413b2e3b0f20cf3fc170d6a711cd93de124d5c7e.tar.xz
vo_xv: fix compilation when shared memory header files are not available
This is an extremely obscure situation, but can actually happen on OpenBSD.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_xv.c7
1 files changed, 2 insertions, 5 deletions
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,