[snappy] ui: no timeout for timeless media
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: no timeout for timeless media
- Date: Tue, 1 May 2012 16:59:54 +0000 (UTC)
commit f3b59d271fecb4288a494982c88034f81e62e93e
Author: Luis de Bethencourt <luis debethencourt com>
Date: Tue May 1 17:59:02 2012 +0100
ui: no timeout for timeless media
Timeout to update time position and seekbar isn't neccesary
and even can be a problem with timeless media, like for example
DVD menus.
src/user_interface.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index 2d5bcec..ca52e3f 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -697,9 +697,10 @@ progress_timing (UserInterface * ui)
g_source_remove (ui->progress_id);
duration_ns = ui->engine->media_duration / MILISEC;
- timeout_ms = duration_ns / ui->seek_width;
-
- ui->progress_id = g_timeout_add (timeout_ms, progress_update_seekbar, ui);
+ if (duration_ns > 0) {
+ timeout_ms = duration_ns / ui->seek_width;
+ ui->progress_id = g_timeout_add (timeout_ms, progress_update_seekbar, ui);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]