From d81fb97f4587f73f62a760b99f686139f9b8d966 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 29 Jun 2016 09:16:13 +0200 Subject: mp_image: split colorimetry metadata into its own struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has two reasons: 1. I tend to add new fields to this metadata, and every time I've done so I've consistently forgotten to update all of the dozens of places in which this colorimetry metadata might end up getting used. While most usages don't really care about most of the metadata, sometimes the intend was simply to “copy” the colorimetry metadata from one struct to another. With this being inside a substruct, those lines of code can now simply read a.color = b.color without having to care about added or removed fields. 2. It makes the type definitions nicer for upcoming refactors. In going through all of the usages, I also expanded a few where I felt that omitting the “young” fields was a bug. --- video/out/vo_rpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out/vo_rpi.c') diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c index cd37362a30..947e63037e 100644 --- a/video/out/vo_rpi.c +++ b/video/out/vo_rpi.c @@ -529,7 +529,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) input->format->es->video.height = MP_ALIGN_UP(params->h, ALIGN_H); input->format->es->video.crop = (MMAL_RECT_T){0, 0, params->w, params->h}; input->format->es->video.par = (MMAL_RATIONAL_T){params->p_w, params->p_h}; - input->format->es->video.color_space = map_csp(params->colorspace); + input->format->es->video.color_space = map_csp(params->color.space); if (mmal_port_format_commit(input)) return -1; -- cgit v1.2.3