+ if (width * stride > FRAME_SIZE) {
+ // TODO: If we had an OpenGL context here, calling create_frame()
+ // would be completely fine.
+ fprintf(stderr, "Card %u: Captured frame %d x %d (stride %d) would be larger than supported frame size (%d > %d), skipping.\n",
+ card_index, width, height, stride, width * stride, FRAME_SIZE);
+ } else {
+ current_video_frame = video_frame_allocator->create_frame(width, height, stride);
+ }