summaryrefslogtreecommitdiffstats
path: root/core/screenshot.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-27 21:24:54 +0200
committerwm4 <wm4@nowhere>2013-07-28 18:44:21 +0200
commitda2b4aa5870f407ad322b6116ed8d66a66dbeadf (patch)
tree4cee7047c5f522c9b98978170a218e118398029a /core/screenshot.c
parent2fc07dcf302061c6f04a7570e2c1825bb2393513 (diff)
downloadmpv-da2b4aa5870f407ad322b6116ed8d66a66dbeadf.tar.bz2
mpv-da2b4aa5870f407ad322b6116ed8d66a66dbeadf.tar.xz
core: make mpctx->opts a pointer
Prevents some awkwardness in a later commit, and makes the code more uniform with other places where MPOpts is accessed. This is a pretty annoying commit (touches tons of lines all over the place), but it hurts only once.
Diffstat (limited to 'core/screenshot.c')
-rw-r--r--core/screenshot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/screenshot.c b/core/screenshot.c
index ee568d4b3d..ea2fe7a3c9 100644
--- a/core/screenshot.c
+++ b/core/screenshot.c
@@ -81,7 +81,7 @@ static void screenshot_msg(screenshot_ctx *ctx, int status, const char *msg,
mp_msg(MSGT_CPLAYER, status == SMSG_ERR ? MSGL_ERR : MSGL_INFO, "%s\n", s);
if (ctx->osd) {
- set_osd_tmsg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts.osd_duration,
+ set_osd_tmsg(ctx->mpctx, OSD_MSG_TEXT, 1, ctx->mpctx->opts->osd_duration,
"%s", s);
}
@@ -234,7 +234,7 @@ static char *gen_fname(screenshot_ctx *ctx, const char *file_ext)
for (;;) {
int prev_sequence = sequence;
char *fname = create_fname(ctx->mpctx,
- ctx->mpctx->opts.screenshot_template,
+ ctx->mpctx->opts->screenshot_template,
file_ext,
&sequence,
&ctx->frameno);
@@ -282,7 +282,7 @@ static void screenshot_save(struct MPContext *mpctx, struct mp_image *image)
{
screenshot_ctx *ctx = mpctx->screenshot_ctx;
- struct image_writer_opts *opts = mpctx->opts.screenshot_image_opts;
+ struct image_writer_opts *opts = mpctx->opts->screenshot_image_opts;
char *filename = gen_fname(ctx, image_writer_file_ext(opts));
if (filename) {
@@ -322,7 +322,7 @@ void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode,
bool osd)
{
screenshot_ctx *ctx = mpctx->screenshot_ctx;
- struct image_writer_opts opts = *mpctx->opts.screenshot_image_opts;
+ struct image_writer_opts opts = *mpctx->opts->screenshot_image_opts;
bool old_osd = ctx->osd;
ctx->osd = osd;