diff options
author | wm4 <wm4@nowhere> | 2016-01-14 00:18:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-14 00:18:31 +0100 |
commit | bf13bd0d47e5fc6761c51c6ba7056968e60bf4cd (patch) | |
tree | a031821a03564128a5e0dabb0a33361fd56b0e07 /player/command.c | |
parent | dd973da108165ebb95e856dbc82326cb35fb45a5 (diff) | |
download | mpv-bf13bd0d47e5fc6761c51c6ba7056968e60bf4cd.tar.bz2 mpv-bf13bd0d47e5fc6761c51c6ba7056968e60bf4cd.tar.xz |
video: refactor: handle video format fixups closer to decoder
Instead of handling this on filter chain reinit, do it directly after
the decoder. This makes the code less entangled. In particular, this
gets rid of the really weird "override params" concept in the video
filter code.
The last_format/fixed_formats have some redundance with decoder_output,
but unfortunately the latter has a slightly different use.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c index 0bee671e88..f2f73059ef 100644 --- a/player/command.c +++ b/player/command.c @@ -2512,8 +2512,8 @@ static int mp_property_vd_imgparams(void *ctx, struct m_property *prop, if (!vd) return M_PROPERTY_UNAVAILABLE; struct mp_codec_params *c = vd->header->codec; - if (vd->vfilter->override_params.imgfmt) { - return property_imgparams(vd->vfilter->override_params, action, arg); + if (vd->vfilter->input_params.imgfmt) { + return property_imgparams(vd->vfilter->input_params, action, arg); } else if (c->disp_w && c->disp_h) { // Simplistic fallback for stupid scripts querying "width"/"height" // before the first frame is decoded. @@ -2779,7 +2779,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop, if (mpctx->d_video && aspect <= 0) { struct dec_video *d_video = mpctx->d_video; struct mp_codec_params *c = d_video->header->codec; - struct mp_image_params *params = &d_video->vfilter->override_params; + struct mp_image_params *params = &d_video->vfilter->input_params; if (params && params->p_w > 0 && params->p_h > 0) { int d_w, d_h; mp_image_params_get_dsize(params, &d_w, &d_h); |