diff options
author | Niklas Haas <git@nand.wakku.to> | 2014-07-28 05:56:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-28 21:24:44 +0200 |
commit | d0a8b571c947a262fe396c5f1d29b80649ed997e (patch) | |
tree | a5dff015981a008c3838bc9a50c0a445722ec402 | |
parent | 261506e36edd88dd1b92ead93868bb624ddcf324 (diff) | |
download | mpv-d0a8b571c947a262fe396c5f1d29b80649ed997e.tar.bz2 mpv-d0a8b571c947a262fe396c5f1d29b80649ed997e.tar.xz |
video: add a default color space for files with no video
Usually mp_image_params_guess_csp takes care of finding *some* default
for a video channel, but files with no video (or with extremely broken
configurations) end up leaving the colorspace information as
MP_CSP_PRIM_AUTO, which has no associated primaries.
As a result of this, color managed OSD messages could not display
because they were being color managed to match the (non-existing/absurd)
video channel. With this change, such non-spaces will have BT.709
primaries as far as color management and the OSD is concerned.
This fixes #961.
CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
-rw-r--r-- | video/csputils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/csputils.c b/video/csputils.c index c462c43c34..1cbaf47de9 100644 --- a/video/csputils.c +++ b/video/csputils.c @@ -305,6 +305,9 @@ struct mp_csp_primaries mp_get_csp_primaries(enum mp_csp_prim spc) .blue = {0.150, 0.060}, .white = d65 }; + // This is the default assumption if no colorspace information could + // be determined, eg. for files which have no video channel. + case MP_CSP_PRIM_AUTO: case MP_CSP_PRIM_BT_709: return (struct mp_csp_primaries) { .red = {0.640, 0.330}, |