summaryrefslogtreecommitdiffstats
path: root/ipecamera
diff options
context:
space:
mode:
Diffstat (limited to 'ipecamera')
-rw-r--r--ipecamera/image.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ipecamera/image.c b/ipecamera/image.c
index 969071d..d6fe185 100644
--- a/ipecamera/image.c
+++ b/ipecamera/image.c
@@ -271,6 +271,8 @@ int ipecamera_start(void *vctx, pcilib_event_t event_mask, pcilib_callback_t cb,
return err;
}
+ ctx->started = 1;
+
return 0;
}
@@ -283,6 +285,8 @@ int ipecamera_stop(void *vctx) {
return PCILIB_ERROR_NOTINITIALIZED;
}
+ ctx->started = 0;
+
if (ctx->buffer) {
free(ctx->buffer);
ctx->buffer = NULL;
@@ -295,8 +299,8 @@ int ipecamera_stop(void *vctx) {
ctx->event_id = 0;
- ctx->buf_ptr = 0;
-
+ ctx->buf_ptr = 0;
+
return 0;
}