diff options
author | wm4 <wm4@nowhere> | 2020-03-01 00:28:09 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-01 00:28:09 +0100 |
commit | ae1aeab7aa2b7c378a9f734d227121f84ae85ed2 (patch) | |
tree | d5bd99fc37ede2a0c6c28a11eb14b1b8347b9a88 /player/command.c | |
parent | b31a5e3a580c3245433a59767921e6766a302e8b (diff) | |
download | mpv-ae1aeab7aa2b7c378a9f734d227121f84ae85ed2.tar.bz2 mpv-ae1aeab7aa2b7c378a9f734d227121f84ae85ed2.tar.xz |
options: make decoder options local to decoder wrapper
Instead of having f_decoder_wrapper create its own copy of the entire
mpv option tree, create a struct local to that file and move all used
options to there.
movie_aspect is used by the "video-aspect" deprecated property code. I
think it's probably better not to remove the property yet, but
fortunately it's easy to work around without needing special handling
for this option or so.
correct_pts is used to prevent use of hr-seek in playloop.c. Ignore
that, if you use --no-correct-pts you're asking for trouble anyway. This
is the only behavior change.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c index fb28b285e1..2ac6add009 100644 --- a/player/command.c +++ b/player/command.c @@ -2565,7 +2565,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop, skip_warn: ; - float aspect = mpctx->opts->movie_aspect; + float aspect = *(float *)opt->data; if (mpctx->vo_chain && aspect <= 0) { struct mp_image_params *params = &mpctx->vo_chain->filter->input_params; if (params && params->p_w > 0 && params->p_h > 0) { @@ -2586,7 +2586,7 @@ skip_warn: ; *(struct m_option *)arg = *(opt->opt); return M_PROPERTY_OK; case M_PROPERTY_PRINT: { - if (mpctx->opts->movie_aspect < 0) { + if (aspect < 0) { *(char **)arg = talloc_asprintf(NULL, "%.3f (original)", aspect); return M_PROPERTY_OK; } |