[pitivi: 3/10] also take pixel aspect ratio into account



commit 02818d8177b53aa2c4680e54414d144cee6eda7c
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Sat Mar 28 10:05:46 2009 -0700

    also take pixel aspect ratio into account
---
 pitivi/ui/previewer.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index 22c3e74..ecda79e 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -293,7 +293,8 @@ class RandomAccessVideoPreviewer(RandomAccessPreviewer):
 
     def __init__(self, factory, stream_):
         if stream_.dar and stream_.par:
-            self.aspect = float(stream_.dar / stream_.par)
+            self.aspect = ((float(stream_.dar.num) * stream_.par.denom) /
+                (stream_.dar.denom * stream_.par.num))
         RandomAccessPreviewer.__init__(self, factory, stream_)
 
     def _pipelineInit(self, factory, sbin):



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