diff options
author | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 23:15:32 +0100 |
commit | 0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2 (patch) | |
tree | b70f214f8c3fc802d6d6edbf8395273c854ac0fd /player/screenshot.c | |
parent | a4fe95b0d8d339ba5afbdb5346ad8fd367a4a1c1 (diff) | |
parent | 245e5b844177e9ad9a9c07eff5efab7c3fccdebc (diff) | |
download | mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.bz2 mpv-0a3e9a9ac3a90da831b497e0613dfb66bc14f3d2.tar.xz |
Merge branch 'msg_refactor'
This branch changes mp_msg() so that it doesn't require global context.
The changes are pretty violent.
Diffstat (limited to 'player/screenshot.c')
-rw-r--r-- | player/screenshot.c | 6 |
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); |