Browse Source

better error message and aborting

master
tth 1 year ago
parent
commit
6b5412edcd
  1. 7
      v4l2/rgb2fimg.c

7
v4l2/rgb2fimg.c

@ -24,7 +24,12 @@ static unsigned short modz; @@ -24,7 +24,12 @@ static unsigned short modz;
* check in image sizes are correct
*/
if ( d->width != w*2 || d->height != h*2 ) {
fprintf(stderr, "%s : dimension error\n", __func__);
fprintf(stderr, "%s: dimension error\n", __func__);
fprintf(stderr, "\tw = %d h = %d\n", w, h);
fprintf(stderr, "\tdest image is %dx%d\n", d->width, d->height);
#if MUST_ABORT
abort();
#endif
return -2;
}

Loading…
Cancel
Save