mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
video-color: return FALSE on unparsable colorimetry
This commit is contained in:
parent
5c043f3d50
commit
8f43cc67d5
1 changed files with 4 additions and 1 deletions
|
@ -90,9 +90,11 @@ gst_video_colorimetry_from_string (GstVideoColorimetry * cinfo,
|
|||
const gchar * color)
|
||||
{
|
||||
const ColorimetryInfo *ci;
|
||||
gboolean res = FALSE;
|
||||
|
||||
if ((ci = gst_video_get_colorimetry (color))) {
|
||||
*cinfo = ci->color;
|
||||
res = TRUE;
|
||||
} else {
|
||||
gint r, m, t, p;
|
||||
|
||||
|
@ -101,9 +103,10 @@ gst_video_colorimetry_from_string (GstVideoColorimetry * cinfo,
|
|||
cinfo->matrix = m;
|
||||
cinfo->transfer = t;
|
||||
cinfo->primaries = p;
|
||||
res = TRUE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue