diff --git a/video/img_format.c b/video/img_format.c index 3dbd94fe62..8d2b0d058b 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -553,7 +553,7 @@ static bool get_native_desc(int mpfmt, struct mp_imgfmt_desc *desc) return true; } -int mp_imgfmt_desc_get_num_comps(struct mp_imgfmt_desc *desc) +int mp_imgfmt_desc_get_num_comps(const struct mp_imgfmt_desc *desc) { int flags = desc->flags; if (!(flags & MP_IMGFLAG_COLOR_MASK)) diff --git a/video/img_format.h b/video/img_format.h index 5f2044c944..8cc7788d76 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -147,7 +147,7 @@ struct mp_imgfmt_desc { struct mp_imgfmt_desc mp_imgfmt_get_desc(int imgfmt); // Return the number of component types, or 0 if unknown. -int mp_imgfmt_desc_get_num_comps(struct mp_imgfmt_desc *desc); +int mp_imgfmt_desc_get_num_comps(const struct mp_imgfmt_desc *desc); // For MP_IMGFLAG_PACKED_SS_YUV formats (packed sub-sampled YUV): positions of // further luma samples. luma_offsets must be an array of align_x size, and the