openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00332
[Branch ~openshot.code/openshot/main] Rev 630: Fixed a bug where reversing a video did not correctly adjust the IN and OUT points.
------------------------------------------------------------
revno: 630
fixes bug: https://launchpad.net/bugs/667806
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Wed 2012-02-01 12:33:35 -0600
message:
Fixed a bug where reversing a video did not correctly adjust the IN and OUT points.
modified:
openshot/classes/clip.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/classes/clip.py'
--- openshot/classes/clip.py 2012-01-31 19:00:34 +0000
+++ openshot/classes/clip.py 2012-02-01 18:33:35 +0000
@@ -451,6 +451,12 @@
if self.reversed:
# add a negative sign
speed_string = "-" + speed_string
+
+ # Update producer (adjust IN and OUT points... because the entire clip is reversed)
+ if self.file_object.file_type == "video":
+ clip_length_in_frames = round(self.max_length * fps) - 1
+ producer.setAttribute("in", str(clip_length_in_frames - int(round(out_frame_number))))
+ producer.setAttribute("out", str(clip_length_in_frames - int(round(in_frame_number))))
# update resource speed
resource_name = resource_name + "?" + speed_string