summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-02 01:00:32 +0100
committerwm4 <wm4@nowhere>2019-11-02 01:00:32 +0100
commitbdd1e1e7ec20bc8ff7a5486d589645d9988c7c6c (patch)
treed123531093d0a63800f66a61ec52733e519e9f7d /video/img_format.c
parent337ccc50dc0eae2154ec9cdfcde003a6cb119f92 (diff)
downloadmpv-bdd1e1e7ec20bc8ff7a5486d589645d9988c7c6c.tar.bz2
mpv-bdd1e1e7ec20bc8ff7a5486d589645d9988c7c6c.tar.xz
img_format: add mp_regular_imgfmt.forced_csp field
As the code comment says, this is needed to disambiguate FFmpeg formats. This struct only describes the "physical" layout of a format, while FFmpeg also attaches part of the colorspace information to the format.
Diffstat (limited to 'video/img_format.c')
-rw-r--r--video/img_format.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c
index e224a4b7d4..524fc4eea3 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -454,6 +454,8 @@ bool mp_get_regular_imgfmt(struct mp_regular_imgfmt *dst, int imgfmt)
return false; // it's satan himself
#endif
+ res.forced_csp = mp_imgfmt_get_forced_csp(imgfmt);
+
if (!validate_regular_imgfmt(&res))
return false;