// For dropped frames, increase the pts. Note that if the format changed
// in the meantime, we have no way of detecting that; we just have to
// assume the frame length is always the same.
// For dropped frames, increase the pts. Note that if the format changed
// in the meantime, we have no way of detecting that; we just have to
// assume the frame length is always the same.
// If the first card is reporting a corrupted or otherwise dropped frame,
// just increase the pts (skipping over this frame) and don't try to compute anything new.
if (card_copy[0].new_frame->len == 0) {
// If the first card is reporting a corrupted or otherwise dropped frame,
// just increase the pts (skipping over this frame) and don't try to compute anything new.
if (card_copy[0].new_frame->len == 0) {
1e-9 * (now.tv_nsec - start.tv_nsec);
if (frame % 100 == 0) {
printf("%d frames (%d dropped) in %.3f seconds = %.1f fps (%.1f ms/frame)\n",
1e-9 * (now.tv_nsec - start.tv_nsec);
if (frame % 100 == 0) {
printf("%d frames (%d dropped) in %.3f seconds = %.1f fps (%.1f ms/frame)\n",
- frame, dropped_frames, elapsed, frame / elapsed,
+ frame, stats_dropped_frames, elapsed, frame / elapsed,