From ccaf5dfc7727ea32920527a7622509b9724ae42f Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 21 Oct 2011 11:25:46 +0200 Subject: Add: readout state --- src/grabbers/me4.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/grabbers') diff --git a/src/grabbers/me4.c b/src/grabbers/me4.c index 48d0756..a157206 100644 --- a/src/grabbers/me4.c +++ b/src/grabbers/me4.c @@ -215,8 +215,10 @@ static uint32_t uca_me4_grab(struct uca_grabber_priv *grabber, void **buffer, ui else last_frame = Fg_getLastPicNumberEx(me4->fg, PORT_A, me4->mem); - if (last_frame <= 0) + if (last_frame <= 0) { + *buffer = NULL; return UCA_ERR_GRABBER | UCA_ERR_FRAME_TRANSFER; + } *frame_number = (uint64_t) last_frame; *buffer = Fg_getImagePtrEx(me4->fg, last_frame, PORT_A, me4->mem); @@ -274,6 +276,7 @@ uint32_t uca_me4_init(struct uca_grabber_priv **grabber) Fg_getParameter(fg, FG_TIMEOUT, &me4->timeout, PORT_A); + me4->timeout = 1; uca->user = me4; uca->destroy = &uca_me4_destroy; uca->set_property = &uca_me4_set_property; -- cgit v1.2.3