summaryrefslogtreecommitdiffstats
path: root/video/out/vo_caca.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-24 21:22:25 +0100
committerwm4 <wm4@nowhere>2014-01-24 21:22:25 +0100
commit2e66f4b89b525f15a709df95ac86cccbcab6bd49 (patch)
tree8c08885e202b4fa25f4de1652c8813014290617d /video/out/vo_caca.c
parent7a6227a18476aee655df5dc76d27c281cc3590c2 (diff)
downloadmpv-2e66f4b89b525f15a709df95ac86cccbcab6bd49.tar.bz2
mpv-2e66f4b89b525f15a709df95ac86cccbcab6bd49.tar.xz
video/out: do remaining config to reconfig replacements
The main difference between the old and new callbacks is that the old callbacks required passing the window size, which is and always was very inconvenient and confusing, since the window size is already in vo->dwidth and vo->dheight.
Diffstat (limited to 'video/out/vo_caca.c')
-rw-r--r--video/out/vo_caca.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/video/out/vo_caca.c b/video/out/vo_caca.c
index 13885b510e..9cc6835c9a 100644
--- a/video/out/vo_caca.c
+++ b/video/out/vo_caca.c
@@ -83,7 +83,7 @@ static int resize(struct vo *vo)
rmask, gmask, bmask, amask);
if (dither == NULL) {
MP_FATAL(vo, "caca_create_dither failed!\n");
- return ENOSYS;
+ return -1;
}
dither_buffer =
talloc_array(NULL, uint8_t, depth * image_width * image_height);
@@ -97,13 +97,11 @@ static int resize(struct vo *vo)
return 0;
}
-static int config(struct vo *vo, uint32_t width, uint32_t height,
- uint32_t d_width, uint32_t d_height, uint32_t flags,
- uint32_t format)
+static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
{
- image_height = height;
- image_width = width;
- image_format = format;
+ image_height = params->h;
+ image_width = params->w;
+ image_format = params->imgfmt;
return resize(vo);
}
@@ -290,7 +288,7 @@ const struct vo_driver video_out_caca = {
.description = "libcaca",
.preinit = preinit,
.query_format = query_format,
- .config = config,
+ .reconfig = reconfig,
.control = control,
.draw_image = draw_image,
.flip_page = flip_page,