xvimagesink: Fix 'comparison of unsigned expression >= 0 is always true'
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 6 Mar 2012 11:47:33 +0000 (12:47 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 6 Mar 2012 11:47:33 +0000 (12:47 +0100)
-1 aka 0xffffffff is the only possible 'negative' value that is used
as a special value for 'not set' here. All other positive values are
valid.

sys/xvimage/xvimagesink.c

index ccfdaae..29fe98c 100644 (file)
@@ -1426,7 +1426,7 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
     xcontext->adaptors[i] = g_strdup (adaptors[i].name);
   }
 
-  if (xvimagesink->adaptor_no >= 0 &&
+  if (xvimagesink->adaptor_no != -1 &&
       xvimagesink->adaptor_no < xcontext->nb_adaptors) {
     /* Find xv port from user defined adaptor */
     gst_lookup_xv_port_from_adaptor (xcontext, adaptors,