/alps/ipecamera

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to ipecamera/events.c

  • Committer: Suren A. Chilingaryan
  • Date: 2012-10-22 22:52:38 UTC
  • Revision ID: csa@dside.dyndns.org-20121022225238-18e0c4zlq9g1bkkf
Fix re-computation of first processable frame_id

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#else /* IPECAMERA_ANNOUNCE_READY */
54
54
            while (ctx->reported_id != ctx->event_id) {
55
55
#endif /* IPECAMERA_ANNOUNCE_READY */
56
 
                if ((ctx->event_id - ctx->reported_id) > (ctx->buffer_size - IPECAMERA_RESERVE_BUFFERS)) ctx->reported_id = ctx->event_id - (ctx->buffer_size - 1) - IPECAMERA_RESERVE_BUFFERS;
 
56
                if ((ctx->event_id - ctx->reported_id) > (ctx->buffer_size - IPECAMERA_RESERVE_BUFFERS)) ctx->reported_id = ctx->event_id - (ctx->buffer_size - 1 - IPECAMERA_RESERVE_BUFFERS);
57
57
                else ++ctx->reported_id;
58
58
 
59
59
                memcpy(&info, ctx->frame + ((ctx->reported_id-1)%ctx->buffer_size), sizeof(ipecamera_event_info_t));