diff options
-rw-r--r-- | ipecamera/events.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipecamera/events.c b/ipecamera/events.c index 8238448..ef85403 100644 --- a/ipecamera/events.c +++ b/ipecamera/events.c @@ -113,9 +113,9 @@ int ipecamera_next_event(pcilib_context_t *vctx, pcilib_timeout_t timeout, pcili if (timeout) { if (timeout == PCILIB_TIMEOUT_INFINITE) { #ifdef IPECAMERA_ANNOUNCE_READY - while ((((!ctx->preproc)&&(ctx->reported_id == ctx->event_id))||((ctx->preproc)&&(ctx->reported_id == ctx->preproc_id)))) { + while ((ctx->started)&&(((!ctx->preproc)&&(ctx->reported_id == ctx->event_id))||((ctx->preproc)&&(ctx->reported_id == ctx->preproc_id)))) { #else /* IPECAMERA_ANNOUNCE_READY */ - while ((ctx->reported_id == ctx->event_id)) { + while ((ctx->started)&&(ctx->reported_id == ctx->event_id)) { #endif /* IPECAMERA_ANNOUNCE_READY */ usleep(IPECAMERA_NOFRAME_SLEEP); } |