Explorar el Código

Merge branch 'w-h-rate' into pre-master

liqian hace 3 años
padre
commit
d96d39ae71
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      utils.py

+ 2 - 0
utils.py

@@ -116,6 +116,8 @@ def update_video_w_h_rate(video_id, key_name):
         return
     # 更新到redis
     width, height, rotate = int(data[0][1]), int(data[0][2]), int(data[0][3])
+    if width == 0 or height == 0:
+        return
     if rotate in (90, 270):
         w_h_rate = height / width
     else: