diff options
author | wm4 <wm4@nowhere> | 2013-07-15 01:04:49 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-15 01:49:26 +0200 |
commit | 0ecd57d4b26500c662c398e3be2cfe316cee2431 (patch) | |
tree | b96e0b5a14297adcd650e1939391351d8aebefb8 /video/decode/vd.c | |
parent | 88e813aae6f2a91177b450a46c04a26db276c422 (diff) | |
download | mpv-0ecd57d4b26500c662c398e3be2cfe316cee2431.tar.bz2 mpv-0ecd57d4b26500c662c398e3be2cfe316cee2431.tar.xz |
video: unify colorspace setup
Guess the colorspace directly in mpcodecs_reconfig_vo(), instead of in
set_video_colorspace(). The difference is that the latter function just
makes the video filter chain (and VOs) force the detected colorspace,
and then throws it away, while the former is a bit more general and
central. Not really a big difference and it doesn't matter much in
practice, but it guarantees that there is no internal disagreement about
the colorspace.
Diffstat (limited to 'video/decode/vd.c')
-rw-r--r-- | video/decode/vd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/decode/vd.c b/video/decode/vd.c index 9df1d39146..b344491c6b 100644 --- a/video/decode/vd.c +++ b/video/decode/vd.c @@ -152,6 +152,8 @@ int mpcodecs_reconfig_vo(sh_video_t *sh, const struct mp_image_params *params) p.d_w = d_w; p.d_h = d_h; + mp_image_params_guess_csp(&p); + vocfg_flags = (opts->fullscreen ? VOFLAG_FULLSCREEN : 0) | (flip ? VOFLAG_FLIPPING : 0); @@ -171,8 +173,9 @@ int mpcodecs_reconfig_vo(sh_video_t *sh, const struct mp_image_params *params) sh->vf_initialized = 1; - sh->colorspace = p.colorspace; - sh->color_range = p.colorlevels; + if (!sh->vf_input) + sh->vf_input = talloc(sh, struct mp_image_params); + *sh->vf_input = p; set_video_colorspace(sh); |