omx: Fix comparisons in gst_omx_state_to_string() case to actually make sense
authorSebastian Dröge <sebastian@centricular.com>
Mon, 19 May 2014 06:47:36 +0000 (08:47 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 19 May 2014 06:47:36 +0000 (08:47 +0200)
CID 1214593

omx/gstomx.c

index 04c5502..7f714bc 100644 (file)
@@ -2394,9 +2394,10 @@ gst_omx_state_to_string (OMX_STATETYPE state)
     case OMX_StateWaitForResources:
       return "WaitForResources";
     default:
-      if (state >= OMX_StateKhronosExtensions)
+      if (state >= OMX_StateKhronosExtensions
+          && state < OMX_StateVendorStartUnused)
         return "KhronosExtensionState";
-      else if (state >= OMX_StateVendorStartUnused)
+      else if (state >= OMX_StateVendorStartUnused && state < OMX_StateMax)
         return "CustomVendorState";
       break;
   }