[jokosher-devel] [Patch] Fixed a future bug that would occur when gst goes 0.11.0+ (FIXED)



The current comparison uses an OR to match versions prior to 0.10.9. This is good as long as the middle version doesn't jump to 0.11.0 or greater, as it would fail the check while being a sane version. The orange line in the logic table represents the conflicting logic output of the comparison in the current code.
I also changed a variable name to improve code readability.

FIX: the logic of the previous patch was still flawed. I did a logic table (attached) which proves that the fixed patch does indeed fix the problem correctly. Sorry for any inconvenience.
Index: /home/david/Projects/Jokosher/Jokosher/JokosherApp.py
===================================================================
--- /home/david/Projects/Jokosher/Jokosher/JokosherApp.py	(revision 966)
+++ /home/david/Projects/Jokosher/Jokosher/JokosherApp.py	(working copy)
@@ -1101,8 +1101,8 @@
 	def CheckGstreamerVersions(self):
 		#Check for CVS versions of Gstreamer and gnonlin
 		message = ""
-		v = gst.version()
-		if (v[1] < 10) or (v[2] < 9):
+		gstVersion = gst.version()
+		if ((gstVersion[1] <= 10 and gstVersion[2] < 9) or gstVersion[1] < 10):
 			message += _("You must have Gstreamer version 0.10.9 or higher.\n")
 		gnl = gst.registry_get_default().find_plugin("gnonlin")
 		if gnl:

Attachment: Tabla lógica del parche para el chequeo de Gstreamer.pdf
Description: Adobe PDF document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]