liqian 3 years ago
parent
commit
a44016a3df
1 changed files with 2 additions and 0 deletions
  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: