[pitivi] previewers: Fix waveforms not scaling when changing clip speed



commit c04608f042fc9a66c594080c54d6a92422ec4e42
Author: Thejas Kiran P S <thejaskiranps gmail com>
Date:   Sat Jul 2 11:50:41 2022 +0530

    previewers: Fix waveforms not scaling when changing clip speed
    
    We were not considering rate of clip while calculating width of
    the surface in which waveforms are drawn.

 pitivi/timeline/previewers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pitivi/timeline/previewers.py b/pitivi/timeline/previewers.py
index d9c8110af..530e86eb2 100644
--- a/pitivi/timeline/previewers.py
+++ b/pitivi/timeline/previewers.py
@@ -1305,7 +1305,7 @@ class AudioPreviewer(Gtk.Layout, Previewer, Zoomable, Loggable):
         rate = internal_duration / duration
 
         inpoint_px = self.ns_to_pixel(start) - self.ns_to_pixel(start - inpoint / rate)
-        max_duration_px = self.ns_to_pixel(clip.maxduration)
+        max_duration_px = self.ns_to_pixel(clip.maxduration / rate)
 
         start_px = min(max(0, inpoint_px + rect.x), max_duration_px)
         end_px = min(max(0, inpoint_px + rect.x + rect.width), max_duration_px)


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