[snappy] ui: constrain progress timeout interval
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: constrain progress timeout interval
- Date: Wed, 2 May 2012 09:25:35 +0000 (UTC)
commit 39a6b04fb9c45999e5df370c63b6850845d209fa
Author: Sebastian DrÃge <sebastian droege collabora co uk>
Date: Wed May 2 10:24:20 2012 +0100
ui: constrain progress timeout interval
src/user_interface.c | 4 ++--
src/user_interface.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index dc54b82..042a36c 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -691,9 +691,9 @@ progress_timing (UserInterface * ui)
if (ui->progress_id != -1)
g_source_remove (ui->progress_id);
- duration_ns = ui->engine->media_duration / MILISEC;
+ duration_ns = ui->engine->media_duration / GST_MSECOND;
if (duration_ns > 0) {
- timeout_ms = duration_ns / ui->seek_width;
+ timeout_ms = MAX (250, duration_ns / ui->seek_width);
ui->progress_id = g_timeout_add (timeout_ms, progress_update_seekbar, ui);
}
}
diff --git a/src/user_interface.h b/src/user_interface.h
index 398109a..e32cc4b 100644
--- a/src/user_interface.h
+++ b/src/user_interface.h
@@ -59,7 +59,6 @@
#define SECOND 1000
#define NANOSEC 1000000000
-#define MILISEC 1000000
#define SEC_IN_HOUR 3600
#define SEC_IN_MIN 60
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]