From bb54cf9559985e166a8d9ae7171c90dd87d7d97a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 25 Jan 2014 00:20:26 +0100 Subject: vo_sdl: fix compilation Still untested, because now it crashes inside of libSDL for unknown reasons. (This also happens with mpv git from yesterday - probably an installation problem, or SDL doing weird things it shouldn't be doing.) --- video/out/vo_sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index 915909578e..d2488ccb5d 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -423,7 +423,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags) for (i = 0; i < vc->renderer_info.num_texture_formats; ++i) for (j = 0; j < sizeof(formats) / sizeof(formats[0]); ++j) if (vc->renderer_info.texture_formats[i] == formats[j].sdl) - if (format == formats[j].mpv) + if (params->imgfmt == formats[j].mpv) texfmt = formats[j].sdl; if (texfmt == SDL_PIXELFORMAT_UNKNOWN) { MP_ERR(vo, "Invalid pixel format\n"); @@ -441,7 +441,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags) mp_image_t *texmpi = &vc->texmpi; mp_image_set_size(texmpi, params->w, params->h); - mp_image_setfmt(texmpi, format); + mp_image_setfmt(texmpi, params->imgfmt); switch (texmpi->num_planes) { case 1: case 3: -- cgit v1.2.3