From c2dc843c7edc9ced051fae10d2f96bd20bbb0fa2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 6 Mar 2012 12:47:33 +0100 Subject: [PATCH] xvimagesink: Fix 'comparison of unsigned expression >= 0 is always true' -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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index ccfdaae..29fe98c 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -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, -- 2.7.4