soundconverter fix rebuild.
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
From 5ab29fa1ca3c347e21b7dc865ae971c10758d7b0 Mon Sep 17 00:00:00 2001
|
||||
From: Gautier Portet <gautier.portet@telespazio.com>
|
||||
Date: Mon, 25 Oct 2021 14:43:53 +0200
|
||||
Subject: [PATCH] Prevent crash when duration is not known or zero
|
||||
|
||||
Closes lp:1948670, thank Richard.
|
||||
---
|
||||
soundconverter/gstreamer/converter.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/soundconverter/gstreamer/converter.py b/soundconverter/gstreamer/converter.py
|
||||
index 0789e54..9e97385 100644
|
||||
--- a/soundconverter/gstreamer/converter.py
|
||||
+++ b/soundconverter/gstreamer/converter.py
|
||||
@@ -260,7 +260,7 @@ def get_progress(self):
|
||||
return 0, duration
|
||||
|
||||
position = self._query_position()
|
||||
- progress = position / duration
|
||||
+ progress = position / duration if duration else 0
|
||||
progress = min(max(progress, 0.0), 1.0)
|
||||
return progress, duration
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
<Dependency>python3-distutils-extra</Dependency>
|
||||
<Dependency>python3-pygobject3-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">Prevent_crash_when_duration_is_not_known_or_zero.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -55,7 +58,7 @@
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2021-10-23</Date>
|
||||
<Date>2021-10-28</Date>
|
||||
<Version>4.0.2</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>fury</Name>
|
||||
|
||||
Reference in New Issue
Block a user