summaryrefslogtreecommitdiff
path: root/xvinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'xvinfo.c')
-rw-r--r--xvinfo.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/xvinfo.c b/xvinfo.c
index 891c8c2..db1a008 100644
--- a/xvinfo.c
+++ b/xvinfo.c
@@ -71,7 +71,7 @@ main(int argc, char *argv[])
exit(-1);
}
- if ((Success != XvQueryExtension(dpy, &ver, &rev, &reqB, &eventB, &errorB))) {
+ if (Success != XvQueryExtension(dpy, &ver, &rev, &reqB, &eventB, &errorB)) {
fprintf(stderr, "%s: No X-Video Extension on %s\n", progname,
(disname != NULL) ? disname : XDisplayName(NULL));
exit(0);
@@ -84,7 +84,12 @@ main(int argc, char *argv[])
for (i = 0; i < nscreens; i++) {
fprintf(stdout, "screen #%i\n", i);
- XvQueryAdaptors(dpy, RootWindow(dpy, i), &nadaptors, &ainfo);
+ if (Success != XvQueryAdaptors(dpy, RootWindow(dpy, i), &nadaptors,
+ &ainfo)) {
+ fprintf(stderr, "%s: Failed to query adaptors on display %s\n",
+ progname, (disname != NULL) ? disname : XDisplayName(NULL));
+ exit(-1);
+ }
if (!nadaptors) {
fprintf(stdout, " no adaptors present\n");
@@ -178,7 +183,14 @@ main(int argc, char *argv[])
fprintf(stdout, " no port attributes defined\n");
}
- XvQueryEncodings(dpy, ainfo[j].base_id, &nencode, &encodings);
+ if (Success != XvQueryEncodings(dpy, ainfo[j].base_id, &nencode,
+ &encodings)) {
+ fprintf(stderr,
+ "%s: Failed to query encodings on display %s\n",
+ progname,
+ (disname != NULL) ? disname : XDisplayName(NULL));
+ exit(-1);
+ }
if (encodings && nencode) {
unsigned int ImageEncodings = 0;