mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
video: Fix some compiler warnings for out-of-range enum values
https://bugzilla.gnome.org/show_bug.cgi?id=767816
This commit is contained in:
parent
508f593d8a
commit
02a88077fc
2 changed files with 6 additions and 6 deletions
|
@ -300,8 +300,8 @@ static const GstVideoColorPrimariesInfo color_primaries[] = {
|
|||
const GstVideoColorPrimariesInfo *
|
||||
gst_video_color_primaries_get_info (GstVideoColorPrimaries primaries)
|
||||
{
|
||||
g_return_val_if_fail (primaries <
|
||||
(GstVideoColorPrimaries) G_N_ELEMENTS (color_primaries), NULL);
|
||||
g_return_val_if_fail ((gint) primaries <
|
||||
G_N_ELEMENTS (color_primaries), NULL);
|
||||
|
||||
return &color_primaries[primaries];
|
||||
}
|
||||
|
|
|
@ -4138,7 +4138,7 @@ gst_video_format_to_fourcc (GstVideoFormat format)
|
|||
{
|
||||
g_return_val_if_fail (format != GST_VIDEO_FORMAT_UNKNOWN, 0);
|
||||
|
||||
if (format >= G_N_ELEMENTS (formats))
|
||||
if ((gint) format >= G_N_ELEMENTS (formats))
|
||||
return 0;
|
||||
|
||||
return formats[format].fourcc;
|
||||
|
@ -4158,7 +4158,7 @@ gst_video_format_to_string (GstVideoFormat format)
|
|||
{
|
||||
g_return_val_if_fail (format != GST_VIDEO_FORMAT_UNKNOWN, NULL);
|
||||
|
||||
if (format >= G_N_ELEMENTS (formats))
|
||||
if ((gint) format >= G_N_ELEMENTS (formats))
|
||||
return NULL;
|
||||
|
||||
return GST_VIDEO_FORMAT_INFO_NAME (&formats[format].info);
|
||||
|
@ -4175,7 +4175,7 @@ gst_video_format_to_string (GstVideoFormat format)
|
|||
const GstVideoFormatInfo *
|
||||
gst_video_format_get_info (GstVideoFormat format)
|
||||
{
|
||||
g_return_val_if_fail (format < G_N_ELEMENTS (formats), NULL);
|
||||
g_return_val_if_fail ((gint) format < G_N_ELEMENTS (formats), NULL);
|
||||
|
||||
return &formats[format].info;
|
||||
}
|
||||
|
@ -4196,7 +4196,7 @@ gst_video_format_get_info (GstVideoFormat format)
|
|||
gconstpointer
|
||||
gst_video_format_get_palette (GstVideoFormat format, gsize * size)
|
||||
{
|
||||
g_return_val_if_fail (format < G_N_ELEMENTS (formats), NULL);
|
||||
g_return_val_if_fail ((gint) format < G_N_ELEMENTS (formats), NULL);
|
||||
g_return_val_if_fail (size != NULL, NULL);
|
||||
|
||||
switch (format) {
|
||||
|
|
Loading…
Reference in a new issue