diff options
author | 2016-06-27 03:14:50 +0300 | |
---|---|---|
committer | 2016-06-28 13:30:23 +0000 | |
commit | 3432419f4f26ffbfdd6a238455dd66c207433578 (patch) | |
tree | 712d3adb3a74225b9dea4478b7a24fe108cfee29 /media-video/mpv/files | |
parent | ros-meta/hector_localization: Bump to 0.3.0. (diff) | |
download | gentoo-3432419f4f26ffbfdd6a238455dd66c207433578.tar.gz gentoo-3432419f4f26ffbfdd6a238455dd66c207433578.tar.bz2 gentoo-3432419f4f26ffbfdd6a238455dd66c207433578.zip |
media-video/mpv: verbump to 0.18.0.
Closes: https://github.com/gentoo/gentoo/pull/1765
Package-Manager: portage-2.3.0
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'media-video/mpv/files')
-rw-r--r-- | media-video/mpv/files/0.18.0/mpv-0.18.0-fix-height-alignment-on-xv.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/media-video/mpv/files/0.18.0/mpv-0.18.0-fix-height-alignment-on-xv.patch b/media-video/mpv/files/0.18.0/mpv-0.18.0-fix-height-alignment-on-xv.patch new file mode 100644 index 000000000000..550b493b40f0 --- /dev/null +++ b/media-video/mpv/files/0.18.0/mpv-0.18.0-fix-height-alignment-on-xv.patch @@ -0,0 +1,67 @@ +commit 22c76e85db88a772e3360892cd3a673a89c6fc7a +Author: wm4 <wm4@nowhere> +Date: Sat Jun 25 12:44:42 2016 +0200 + +vo_xv: fix behavior with odd sizes + +The size check introduced in commit d941a57b did not consider that Xv +can round up the image size to the next chroma boundary. Doing that +makes sense, so it can't certainly be considered server misbehavior. + +Do 2 things against this: allow if the server returns a larger image (we +just crop it then), and also allocate a properly aligned image in the +first place. +--- + +diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c +index 1e7ae7c..a5a4728 100644 +--- a/video/out/vo_xv.c ++++ b/video/out/vo_xv.c +@@ -533,6 +533,8 @@ 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); ++ // round up the height to next chroma boundary too ++ int aligned_h = FFALIGN(ctx->image_height, 2); + #if HAVE_SHM && HAVE_XEXT + if (x11->display_is_local && XShmQueryExtension(x11->display)) { + ctx->Shmem_Flag = 1; +@@ -546,7 +548,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) + ctx->xvimage[foo] = + (XvImage *) XvShmCreateImage(x11->display, ctx->xv_port, + ctx->xv_format, NULL, +- aligned_w, ctx->image_height, ++ aligned_w, aligned_h, + &ctx->Shminfo[foo]); + if (!ctx->xvimage[foo]) + return false; +@@ -569,7 +571,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) + ctx->xvimage[foo] = + (XvImage *) XvCreateImage(x11->display, ctx->xv_port, + ctx->xv_format, NULL, aligned_w, +- ctx->image_height); ++ aligned_h); + if (!ctx->xvimage[foo]) + return false; + ctx->xvimage[foo]->data = av_malloc(ctx->xvimage[foo]->data_size); +@@ -578,16 +580,16 @@ static bool allocate_xvimage(struct vo *vo, int foo) + XSync(x11->display, False); + } + +- if ((ctx->xvimage[foo]->width != aligned_w) || +- (ctx->xvimage[foo]->height != ctx->image_height)) { +- MP_ERR(vo, "Got XvImage with incorrect size: %ux%u (expected %ux%u)\n", ++ if ((ctx->xvimage[foo]->width < aligned_w) || ++ (ctx->xvimage[foo]->height < aligned_h)) { ++ MP_ERR(vo, "Got XvImage with too small size: %ux%u (expected %ux%u)\n", + ctx->xvimage[foo]->width, ctx->xvimage[foo]->height, + aligned_w, ctx->image_height); + return false; + } + + struct mp_image img = get_xv_buffer(vo, foo); +- img.w = aligned_w; ++ mp_image_set_size(&img, aligned_w, aligned_h); + mp_image_clear(&img, 0, 0, img.w, img.h); + return true; + } |