summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-04-10 12:45:12 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-04-10 12:45:12 +0200
commit41c5995d1a6c23c49e8683095aec7a25361d331a (patch)
tree53e093272dd7612cac5cb558559274503c660a79 /tools
parent5df96007494558caf68b5fc9a07ce8815a3d8104 (diff)
downloaduca-41c5995d1a6c23c49e8683095aec7a25361d331a.tar.gz
uca-41c5995d1a6c23c49e8683095aec7a25361d331a.tar.bz2
uca-41c5995d1a6c23c49e8683095aec7a25361d331a.tar.xz
uca-41c5995d1a6c23c49e8683095aec7a25361d331a.zip
Only break out if duration is set
Diffstat (limited to 'tools')
-rw-r--r--tools/grab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/grab.c b/tools/grab.c
index 41f5a6e..972f000 100644
--- a/tools/grab.c
+++ b/tools/grab.c
@@ -71,7 +71,6 @@ get_bytes_per_pixel (guint bits_per_pixel)
return bits_per_pixel > 8 ? 2 : 1;
}
-
#ifdef HAVE_LIBTIFF
static void
write_tiff (RingBuffer *buffer,
@@ -204,7 +203,7 @@ record_frames (UcaCamera *camera, Options *opts)
n_frames++;
elapsed = g_timer_elapsed (timer, NULL);
- if (n_frames == opts->n_frames || elapsed >= opts->duration)
+ if (n_frames == opts->n_frames || (opts->duration > 0.0 && elapsed >= opts->duration))
break;
if (elapsed - last_printed >= 1.0) {