summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-03-29 18:05:58 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-03-29 18:05:58 +0200
commitadb36212be886985dbaf397d7d2dd875b3d4aab8 (patch)
tree292b252b22f823eb4eb8753c7d437b723e23a85b /cli.c
parentb222af943c405df509eb9df084d203da4fbd324e (diff)
downloadipecamera-adb36212be886985dbaf397d7d2dd875b3d4aab8.tar.gz
ipecamera-adb36212be886985dbaf397d7d2dd875b3d4aab8.tar.bz2
ipecamera-adb36212be886985dbaf397d7d2dd875b3d4aab8.tar.xz
ipecamera-adb36212be886985dbaf397d7d2dd875b3d4aab8.zip
Fix frame size computation in ipecamera and few debuging options
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index ccd3084..052bb3b 100644
--- a/cli.c
+++ b/cli.c
@@ -1237,7 +1237,8 @@ int GrabCallback(pcilib_event_id_t event_id, pcilib_event_info_t *info, void *us
ctx->event_pending = 0;
ctx->event_count++;
- ctx->missing_count += (info->seqnum - ctx->last_num) - 1;
+ if (ctx->last_num)
+ ctx->missing_count += (info->seqnum - ctx->last_num) - 1;
ctx->last_num = info->seqnum;
if (info->flags&PCILIB_EVENT_INFO_FLAG_BROKEN) {