Browse Source

better error handling, part 28

master
phyto 3 years ago
parent
commit
0a1abce976
  1. 3
      v4l2/grabvidseq.c

3
v4l2/grabvidseq.c

@ -49,6 +49,7 @@ do { @@ -49,6 +49,7 @@ do {
if (r == -1) {
fprintf(stderr, "error %d, %s\n", errno, strerror(errno));
sleep(1);
exit(EXIT_FAILURE);
}
}
@ -103,7 +104,7 @@ if (verbosity) { @@ -103,7 +104,7 @@ if (verbosity) {
fd = v4l2_open(dev_name, O_RDWR | O_NONBLOCK, 0);
if (fd < 0) {
perror("Cannot open device");
perror(dev_name);
exit(EXIT_FAILURE);
}

Loading…
Cancel
Save