mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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 gchar * color)
|
||||||
{
|
{
|
||||||
const ColorimetryInfo *ci;
|
const ColorimetryInfo *ci;
|
||||||
|
gboolean res = FALSE;
|
||||||
|
|
||||||
if ((ci = gst_video_get_colorimetry (color))) {
|
if ((ci = gst_video_get_colorimetry (color))) {
|
||||||
*cinfo = ci->color;
|
*cinfo = ci->color;
|
||||||
|
res = TRUE;
|
||||||
} else {
|
} else {
|
||||||
gint r, m, t, p;
|
gint r, m, t, p;
|
||||||
|
|
||||||
|
@ -101,9 +103,10 @@ gst_video_colorimetry_from_string (GstVideoColorimetry * cinfo,
|
||||||
cinfo->matrix = m;
|
cinfo->matrix = m;
|
||||||
cinfo->transfer = t;
|
cinfo->transfer = t;
|
||||||
cinfo->primaries = p;
|
cinfo->primaries = p;
|
||||||
|
res = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue