[brasero] Fix progress bar when it is not possible to determine the position in the stream while transcoding a
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] Fix progress bar when it is not possible to determine the position in the stream while transcoding a
- Date: Sun, 21 Jun 2009 17:08:08 -0400 (EDT)
commit 58f3bd24e4e6a963d680e5f1591be6efb424495c
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sun Jun 21 13:52:25 2009 +0200
Fix progress bar when it is not possible to determine the position in the stream while transcoding a video
plugins/transcode/burn-vob.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/transcode/burn-vob.c b/plugins/transcode/burn-vob.c
index 94f300c..15a38fb 100644
--- a/plugins/transcode/burn-vob.c
+++ b/plugins/transcode/burn-vob.c
@@ -1131,12 +1131,14 @@ 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) {
+ if (duration > 0.0 && position > 0.0) {
gdouble progress;
progress = (gdouble) position / (gdouble) duration;
brasero_job_set_progress (job, progress);
}
+ else
+ brasero_job_set_progress (job, -1.0);
return BRASERO_BURN_OK;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]