diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-05-19 08:45:10 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-05-19 08:47:33 +0200 |
commit | 7b558e37bc80d40a118f622fd822159a3addd8bc (patch) | |
tree | e2aeac8264e0a4ff597c9f5998d45ab5379e9a0f | |
parent | 93528dc43b783a758f87c579f694b0d5c7098536 (diff) | |
download | gst-omx-7b558e37bc80d40a118f622fd822159a3addd8bc.tar.gz |
omx: Make sure to compare the error codes as unsigned integers so that comparisons >2**31 actually work
CID 1214592
-rw-r--r-- | omx/gstomx.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c index 1467465..04c5502 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -2285,7 +2285,9 @@ gst_omx_get_configuration (void) const gchar * gst_omx_error_to_string (OMX_ERRORTYPE err) { - switch (err) { + guint err_u = (guint) err; + + switch (err_u) { case OMX_ErrorNone: return "None"; case OMX_ErrorInsufficientResources: @@ -2363,11 +2365,11 @@ gst_omx_error_to_string (OMX_ERRORTYPE err) case OMX_ErrorTunnelingUnsupported: return "Tunneling unsupported"; default: - if (err >= (guint32) OMX_ErrorKhronosExtensions - && err < (guint32) OMX_ErrorVendorStartUnused) { + if (err_u >= (guint) OMX_ErrorKhronosExtensions + && err_u < (guint) OMX_ErrorVendorStartUnused) { return "Khronos extension error"; - } else if (err >= (guint32) OMX_ErrorVendorStartUnused - && err < (guint32) OMX_ErrorMax) { + } else if (err_u >= (guint) OMX_ErrorVendorStartUnused + && err_u < (guint) OMX_ErrorMax) { return "Vendor specific error"; } else { return "Unknown error"; |