summaryrefslogtreecommitdiffstats
path: root/ipecamera
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-10-23 09:38:57 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-10-23 09:38:57 +0200
commit7b265f85942f0aaa9a48c5773dff6bd27a6970b3 (patch)
tree041b57eea4d27429485b167f4e64be22d0282136 /ipecamera
parent4663eed43d060a5d1f6894eda14e3df00245f7fc (diff)
downloadipecamera-7b265f85942f0aaa9a48c5773dff6bd27a6970b3.tar.gz
ipecamera-7b265f85942f0aaa9a48c5773dff6bd27a6970b3.tar.bz2
ipecamera-7b265f85942f0aaa9a48c5773dff6bd27a6970b3.tar.xz
ipecamera-7b265f85942f0aaa9a48c5773dff6bd27a6970b3.zip
Consider RESERVE_BUFFERS while computing buffer size required for ipecamera fast reject
Diffstat (limited to 'ipecamera')
-rw-r--r--ipecamera/ipecamera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipecamera/ipecamera.c b/ipecamera/ipecamera.c
index 2868d6b..27bea77 100644
--- a/ipecamera/ipecamera.c
+++ b/ipecamera/ipecamera.c
@@ -128,8 +128,8 @@ pcilib_context_t *ipecamera_init(pcilib_t *pcilib) {
#ifdef IPECAMERA_BUG_POSTPONED_READ
GET_REG(max_frames_reg, value);
- if (value >= ctx->buffer_size) {
- ctx->buffer_size = value + 1;
+ if ((value + IPECAMERA_RESERVE_BUFFERS + 3) > ctx->buffer_size) {
+ ctx->buffer_size = (value + 1) + IPECAMERA_RESERVE_BUFFERS + 2;
}
#endif /* IPECAMERA_BUG_POSTPONED_READ */