summaryrefslogtreecommitdiffstats
path: root/player/screenshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/screenshot.c')
-rw-r--r--player/screenshot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/screenshot.c b/player/screenshot.c
index d2879051b0..7336c64e97 100644
--- a/player/screenshot.c
+++ b/player/screenshot.c
@@ -234,7 +234,7 @@ static char *create_fname(struct MPContext *mpctx, char *template,
res = talloc_strdup_append(res, template);
res = talloc_asprintf_append(res, ".%s", file_ext);
- char *fname = mp_get_user_path(NULL, res);
+ char *fname = mp_get_user_path(NULL, mpctx->global, res);
talloc_free(res);
return fname;
@@ -301,7 +301,7 @@ static void screenshot_save(struct MPContext *mpctx, struct mp_image *image)
char *filename = gen_fname(ctx, image_writer_file_ext(opts));
if (filename) {
screenshot_msg(ctx, SMSG_OK, "Screenshot: '%s'", filename);
- if (!write_image(image, opts, filename))
+ if (!write_image(image, opts, filename, mpctx->log))
screenshot_msg(ctx, SMSG_ERR, "Error writing screenshot!");
talloc_free(filename);
}
@@ -354,7 +354,7 @@ void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode,
goto end;
}
screenshot_msg(ctx, SMSG_OK, "Screenshot: '%s'", filename);
- if (!write_image(image, &opts, filename))
+ if (!write_image(image, &opts, filename, mpctx->log))
screenshot_msg(ctx, SMSG_ERR, "Error writing screenshot!");
talloc_free(image);