summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-03-10 16:58:05 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-03-10 16:58:05 +0100
commitf3d280fb8a7f2bccd4367349e00be00d25702195 (patch)
treed8d9917bb7ac7b568c17ffe8bde30bd7ad48cdee
parente43e5999f2af8b69185e0c627515cca755150418 (diff)
downloadipecamera-f3d280fb8a7f2bccd4367349e00be00d25702195.tar.gz
ipecamera-f3d280fb8a7f2bccd4367349e00be00d25702195.tar.bz2
ipecamera-f3d280fb8a7f2bccd4367349e00be00d25702195.tar.xz
ipecamera-f3d280fb8a7f2bccd4367349e00be00d25702195.zip
Don't bail out on empty detected if waiting for a new packet
-rw-r--r--dma/ipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dma/ipe.c b/dma/ipe.c
index f2d0f74..147bf38 100644
--- a/dma/ipe.c
+++ b/dma/ipe.c
@@ -406,7 +406,7 @@ int dma_ipe_stream_read(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, uin
while (((*last_written_addr_ptr == 0)||(ctx->last_read_addr == (*last_written_addr_ptr)))&&((wait == PCILIB_TIMEOUT_INFINITE)||(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < wait))) {
usleep(10);
#ifdef IPEDMA_SUPPORT_EMPTY_DETECTED
- if (*empty_detected_ptr) break;
+ if ((ret != PCILIB_STREAMING_REQ_PACKET)&&(*empty_detected_ptr)) break;
#endif /* IPEDMA_SUPPORT_EMPTY_DETECTED */
gettimeofday(&cur, NULL);
}