[brasero] Fix progress reporting when video transcoder plugin cannot report either duration or position
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix progress reporting when video transcoder plugin cannot report either duration or position
- Date: Mon, 24 Aug 2009 13:45:31 +0000 (UTC)
commit aef4894a54ba6cd6b76613930daa28105e03cc63
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Aug 18 13:52:52 2009 +0200
Fix progress reporting when video transcoder plugin cannot report either duration or position
plugins/transcode/burn-vob.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/plugins/transcode/burn-vob.c b/plugins/transcode/burn-vob.c
index 0a93994..87b9d75 100644
--- a/plugins/transcode/burn-vob.c
+++ b/plugins/transcode/burn-vob.c
@@ -1127,8 +1127,8 @@ brasero_vob_start (BraseroJob *job,
static BraseroBurnResult
brasero_vob_clock_tick (BraseroJob *job)
{
- gint64 position = 0.0;
- gint64 duration = 0.0;
+ gint64 position = 0;
+ gint64 duration = 0;
BraseroVobPrivate *priv;
GstFormat format = GST_FORMAT_TIME;
@@ -1136,14 +1136,15 @@ brasero_vob_clock_tick (BraseroJob *job)
gst_element_query_duration (priv->pipeline, &format, &duration);
gst_element_query_position (priv->pipeline, &format, &position);
-
- if (duration <= 0.0 || position <= 0.0) {
+ if (duration <= 0 || position <= 0) {
format = GST_FORMAT_BYTES;
+ duration = 0;
+ position = 0;
gst_element_query_duration (priv->pipeline, &format, &duration);
gst_element_query_position (priv->pipeline, &format, &position);
}
- if (duration > 0.0 && position > 0.0) {
+ if (duration > 0 && position > 0) {
gdouble progress;
progress = (gdouble) position / (gdouble) duration;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]