diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 20:18:27 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 20:18:27 +0100 |
commit | daaf50c75a4201bdf2911aa9c2fa2765fa9e40e7 (patch) | |
tree | 8ea0cec3ecbc810fae0aac59fc7a1606ca00eade /cli.c | |
parent | 253e5f1ad3526de662e66c12f3e083025436c8e3 (diff) | |
download | ipecamera-daaf50c75a4201bdf2911aa9c2fa2765fa9e40e7.tar.gz ipecamera-daaf50c75a4201bdf2911aa9c2fa2765fa9e40e7.tar.bz2 ipecamera-daaf50c75a4201bdf2911aa9c2fa2765fa9e40e7.tar.xz ipecamera-daaf50c75a4201bdf2911aa9c2fa2765fa9e40e7.zip |
Image frames decoding
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1116,10 +1116,19 @@ int GrabCallback(pcilib_event_id_t event_id, pcilib_event_info_t *info, void *us ctx->event_pending = 0; ctx->event_count++; - if (info->flags&PCILIB_EVENT_INFO_FLAG_BROKEN) ctx->broken_count++; + if (info->flags&PCILIB_EVENT_INFO_FLAG_BROKEN) { + ctx->broken_count++; + return 0; + } data = pcilib_get_data(handle, ctx->event, ctx->data, &size); - if (!data) Error("Internal Error: No data is provided to event callback"); + if (!data) { + ctx->broken_count++; + return 0; + } + + + //Error("Internal Error: No data is provided to event callback"); written = fwrite(data, 1, size, ctx->output); if (written != size) { @@ -1152,6 +1161,7 @@ int GrabCallback(pcilib_event_id_t event_id, pcilib_event_info_t *info, void *us */ // printf("data callback: %lu\n", event_id); + return 0; } int raw_data(pcilib_event_id_t event_id, pcilib_event_info_t *info, pcilib_event_flags_t flags, size_t size, void *data, void *user) { |