← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 556: Fixed list of effects to not include SOX effects that MLT does not know about. This prevents seg...

 

------------------------------------------------------------
revno: 556
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Sun 2011-09-04 23:36:22 -0500
message:
  Fixed list of effects to not include SOX effects that MLT does not know about.  This prevents segmentation faults for older versions of Sox, or missing versions of Sox.
modified:
  openshot/windows/TreeEffects.py


--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main

Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/TreeEffects.py'
--- openshot/windows/TreeEffects.py	2011-09-04 06:00:56 +0000
+++ openshot/windows/TreeEffects.py	2011-09-05 04:36:22 +0000
@@ -108,7 +108,7 @@
 				self.treeview.set_item_width(90)
 			else:
 				self.treeview.set_item_width(130)
-			
+		
 		
 		# Add effects to dropdown
 		counter = 0
@@ -138,6 +138,13 @@
 					# don't add this effect, skip to the next one
 					print "Warning: effect not found in your version of Frei0r: %s" % my_effect.service
 					continue
+
+			# does the sox installation include this effect?
+			if my_effect.service.startswith("sox"):
+				if ("sox.%s" % my_effect.audio_effect) not in self.project.form.filters:
+					# don't add this effect, skip to the next one
+					print "Warning: effect not found in your version of Sox: %s" % ("sox:%s" % my_effect.audio_effect)
+					continue
 			
 			# check if a filter matches (if any)
 			if not self.does_match_filter(my_effect, filter):