summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-22 08:48:42 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-22 08:48:42 +0100
commit7031f10aee0714f02ea3df2203730eb02584ccfc (patch)
treea348fa6377771f59aa56b0ffd08e0e0fe1321b89 /src
parentc8d39cd185b8ba5fa7e178924b6db9e8819fc528 (diff)
downloadlibuca-7031f10aee0714f02ea3df2203730eb02584ccfc.tar.gz
libuca-7031f10aee0714f02ea3df2203730eb02584ccfc.tar.bz2
libuca-7031f10aee0714f02ea3df2203730eb02584ccfc.tar.xz
libuca-7031f10aee0714f02ea3df2203730eb02584ccfc.zip
Use latest picture number when requesting new ones
Diffstat (limited to 'src')
-rw-r--r--src/grabbers/me4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grabbers/me4.c b/src/grabbers/me4.c
index aea67f0..4c6420e 100644
--- a/src/grabbers/me4.c
+++ b/src/grabbers/me4.c
@@ -138,11 +138,11 @@ uint32_t uca_me4_stop_acquire(struct uca_grabber *grabber)
uint32_t uca_me4_grab(struct uca_grabber *grabber, void **buffer, uint32_t *frame_number)
{
- int32_t last_frame;
+ static int32_t last_frame = 0;
if (grabber->asynchronous)
last_frame = Fg_getLastPicNumberEx(GET_FG(grabber), PORT_A, GET_MEM(grabber));
else
- last_frame = Fg_getLastPicNumberBlockingEx(GET_FG(grabber), 1, PORT_A, 10, GET_MEM(grabber));
+ last_frame = Fg_getLastPicNumberBlockingEx(GET_FG(grabber), last_frame+1, PORT_A, 10, GET_MEM(grabber));
if (last_frame <= 0)
return UCA_ERR_PROP_GENERAL;