mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
omx: Make sure to compare the error codes as unsigned integers so that comparisons >2**31 actually work
CID 1214592
This commit is contained in:
parent
93528dc43b
commit
7b558e37bc
1 changed files with 7 additions and 5 deletions
12
omx/gstomx.c
12
omx/gstomx.c
|
@ -2285,7 +2285,9 @@ gst_omx_get_configuration (void)
|
||||||
const gchar *
|
const gchar *
|
||||||
gst_omx_error_to_string (OMX_ERRORTYPE err)
|
gst_omx_error_to_string (OMX_ERRORTYPE err)
|
||||||
{
|
{
|
||||||
switch (err) {
|
guint err_u = (guint) err;
|
||||||
|
|
||||||
|
switch (err_u) {
|
||||||
case OMX_ErrorNone:
|
case OMX_ErrorNone:
|
||||||
return "None";
|
return "None";
|
||||||
case OMX_ErrorInsufficientResources:
|
case OMX_ErrorInsufficientResources:
|
||||||
|
@ -2363,11 +2365,11 @@ gst_omx_error_to_string (OMX_ERRORTYPE err)
|
||||||
case OMX_ErrorTunnelingUnsupported:
|
case OMX_ErrorTunnelingUnsupported:
|
||||||
return "Tunneling unsupported";
|
return "Tunneling unsupported";
|
||||||
default:
|
default:
|
||||||
if (err >= (guint32) OMX_ErrorKhronosExtensions
|
if (err_u >= (guint) OMX_ErrorKhronosExtensions
|
||||||
&& err < (guint32) OMX_ErrorVendorStartUnused) {
|
&& err_u < (guint) OMX_ErrorVendorStartUnused) {
|
||||||
return "Khronos extension error";
|
return "Khronos extension error";
|
||||||
} else if (err >= (guint32) OMX_ErrorVendorStartUnused
|
} else if (err_u >= (guint) OMX_ErrorVendorStartUnused
|
||||||
&& err < (guint32) OMX_ErrorMax) {
|
&& err_u < (guint) OMX_ErrorMax) {
|
||||||
return "Vendor specific error";
|
return "Vendor specific error";
|
||||||
} else {
|
} else {
|
||||||
return "Unknown error";
|
return "Unknown error";
|
||||||
|
|
Loading…
Reference in a new issue