summaryrefslogtreecommitdiff
blob: 9cd9341de055e8fda03ebc93e605a2fb71a850f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From aaaca3aa30cc17942699bc7a1b1da7af984600dd Mon Sep 17 00:00:00 2001
From: Henry Gebhardt <hsggebhardt@googlemail.com>
Date: Thu, 14 Oct 2010 17:27:23 +0200
Subject: [PATCH] devede_newfiles: Check aspect_ratio for NaN

---
 devede_newfiles.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/devede_newfiles.py b/devede_newfiles.py
index 8047861..a17795a 100755
--- a/devede_newfiles.py
+++ b/devede_newfiles.py
@@ -30,6 +30,7 @@ import sys
 import gc
 import copy
 import time
+import math
 
 import devede_other
 import devede_executor
@@ -153,7 +154,7 @@ class file_get_params(devede_executor.executor):
 				self.audio=audio
 			return False,audio
 		
-		if aspect_ratio==0.0:
+		if aspect_ratio==0.0 or math.isnan(aspect_ratio):
 			aspect_ratio=(float(width))/(float(height))
 			if aspect_ratio<=1.5:
 				aspect_ratio=(4.0/3.0)
-- 
1.7.3.1